singrdk/base/Windows/mkmsil/msil/MetaDataEventPtr.cs

51 lines
1.1 KiB
C#
Raw Normal View History

2008-11-17 18:29:00 -05:00
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
using System;
namespace Bartok.MSIL
{
public class MetaDataEventPtr: MetaDataObject {
// Constructor Methods
internal MetaDataEventPtr(int eventIndex) {
this.eventIndex = eventIndex;
}
// This is technically not a constructor method, but it is meant to
// be used to set up the object
internal void resolveReferences(MetaDataLoader loader) {
this.eventObject = loader.getEvent(this.eventIndex);
}
// Access Methods
public MetaDataEvent Event {
get {
return this.eventObject;
}
}
// Debug Methods
public override String ToString() {
if (this.eventObject == null) {
return ("MetaDataEventPtr("+this.eventIndex+")");
}
else {
return ("MetaDataEventPtr("+this.eventObject+")");
}
}
// State
private readonly int eventIndex;
private MetaDataEvent eventObject;
}
}