//
//
//
//
// $Revision$
//
// This file is automatically generated - any changes will be lost
#pragma warning disable 1591
namespace Debugger.Wrappers.CorDebug
{
using System;
public partial class ICorDebugClass
{
private Debugger.Interop.CorDebug.ICorDebugClass wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugClass WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugClass(Debugger.Interop.CorDebug.ICorDebugClass wrappedObject)
{
this.wrappedObject = wrappedObject;
ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugClass));
}
public static ICorDebugClass Wrap(Debugger.Interop.CorDebug.ICorDebugClass objectToWrap)
{
if ((objectToWrap != null))
{
return new ICorDebugClass(objectToWrap);
} else
{
return null;
}
}
~ICorDebugClass()
{
object o = wrappedObject;
wrappedObject = null;
ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugClass));
}
public bool Is() where T: class
{
System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0];
System.Type paramType = ctor.GetParameters()[0].ParameterType;
return paramType.IsInstanceOfType(this.WrappedObject);
}
public T As() where T: class
{
try {
return CastTo();
} catch {
return null;
}
}
public T CastTo() where T: class
{
return (T)Activator.CreateInstance(typeof(T), this.WrappedObject);
}
public static bool operator ==(ICorDebugClass o1, ICorDebugClass o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugClass o1, ICorDebugClass o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugClass casted = o as ICorDebugClass;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public ICorDebugModule Module
{
get
{
ICorDebugModule pModule;
Debugger.Interop.CorDebug.ICorDebugModule out_pModule;
this.WrappedObject.GetModule(out out_pModule);
pModule = ICorDebugModule.Wrap(out_pModule);
return pModule;
}
}
public uint Token
{
get
{
uint pTypeDef;
this.WrappedObject.GetToken(out pTypeDef);
return pTypeDef;
}
}
public ICorDebugValue GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame)
{
ICorDebugValue ppValue;
Debugger.Interop.CorDebug.ICorDebugValue out_ppValue;
this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue);
ppValue = ICorDebugValue.Wrap(out_ppValue);
return ppValue;
}
}
}
#pragma warning restore 1591