//
//
//
//
// $Revision$
//
// This file is automatically generated - any changes will be lost
#pragma warning disable 1591
namespace Debugger.Wrappers.CorDebug
{
using System;
public partial class ICorDebugStringValue
{
private Debugger.Interop.CorDebug.ICorDebugStringValue wrappedObject;
internal Debugger.Interop.CorDebug.ICorDebugStringValue WrappedObject
{
get
{
return this.wrappedObject;
}
}
public ICorDebugStringValue(Debugger.Interop.CorDebug.ICorDebugStringValue wrappedObject)
{
this.wrappedObject = wrappedObject;
ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugStringValue));
}
public static ICorDebugStringValue Wrap(Debugger.Interop.CorDebug.ICorDebugStringValue objectToWrap)
{
if ((objectToWrap != null))
{
return new ICorDebugStringValue(objectToWrap);
} else
{
return null;
}
}
~ICorDebugStringValue()
{
object o = wrappedObject;
wrappedObject = null;
ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugStringValue));
}
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 ==(ICorDebugStringValue o1, ICorDebugStringValue o2)
{
return ((object)o1 == null && (object)o2 == null) ||
((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject);
}
public static bool operator !=(ICorDebugStringValue o1, ICorDebugStringValue o2)
{
return !(o1 == o2);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override bool Equals(object o)
{
ICorDebugStringValue casted = o as ICorDebugStringValue;
return (casted != null) && (casted.WrappedObject == wrappedObject);
}
public uint Type
{
get
{
uint pType;
this.WrappedObject.GetType(out pType);
return pType;
}
}
public uint Size
{
get
{
uint pSize;
this.WrappedObject.GetSize(out pSize);
return pSize;
}
}
public ulong Address
{
get
{
ulong pAddress;
this.WrappedObject.GetAddress(out pAddress);
return pAddress;
}
}
public ICorDebugValueBreakpoint CreateBreakpoint()
{
ICorDebugValueBreakpoint ppBreakpoint;
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
return ppBreakpoint;
}
public int IsValid
{
get
{
int pbValid;
this.WrappedObject.IsValid(out pbValid);
return pbValid;
}
}
public ICorDebugValueBreakpoint CreateRelocBreakpoint()
{
ICorDebugValueBreakpoint ppBreakpoint;
Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint;
this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint);
ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint);
return ppBreakpoint;
}
public uint Length
{
get
{
uint pcchString;
this.WrappedObject.GetLength(out pcchString);
return pcchString;
}
}
public void GetString(uint cchString, out uint pcchString, System.IntPtr szString)
{
this.WrappedObject.GetString(cchString, out pcchString, szString);
}
}
}
#pragma warning restore 1591