43 lines
1.7 KiB
C#
43 lines
1.7 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Runtime.Remoting
|
|
{
|
|
/// <summary>Wraps marshal-by-value object references, allowing them to be returned through an indirection.</summary>
|
|
// Token: 0x02000444 RID: 1092
|
|
[ComVisible(true)]
|
|
[ClassInterface(ClassInterfaceType.AutoDual)]
|
|
public class ObjectHandle : MarshalByRefObject, IObjectHandle
|
|
{
|
|
/// <summary>Initializes an instance of the <see cref="T:System.Runtime.Remoting.ObjectHandle" /> class, wrapping the given object <paramref name="o" />.</summary>
|
|
/// <param name="o">The object that is wrapped by the new <see cref="T:System.Runtime.Remoting.ObjectHandle" />. </param>
|
|
// Token: 0x06002A01 RID: 10753 RVA: 0x00086CAC File Offset: 0x00084EAC
|
|
public ObjectHandle(object o)
|
|
{
|
|
this._wrapped = o;
|
|
}
|
|
|
|
/// <summary>Initializes the lifetime lease of the wrapped object.</summary>
|
|
/// <returns>An initialized <see cref="T:System.Runtime.Remoting.Lifetime.ILease" /> that allows you to control the lifetime of the wrapped object.</returns>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration, Infrastructure" />
|
|
/// </PermissionSet>
|
|
// Token: 0x06002A02 RID: 10754 RVA: 0x00086CBC File Offset: 0x00084EBC
|
|
public override object InitializeLifetimeService()
|
|
{
|
|
return base.InitializeLifetimeService();
|
|
}
|
|
|
|
/// <summary>Returns the wrapped object.</summary>
|
|
/// <returns>The wrapped object.</returns>
|
|
// Token: 0x06002A03 RID: 10755 RVA: 0x00086CC4 File Offset: 0x00084EC4
|
|
public object Unwrap()
|
|
{
|
|
return this._wrapped;
|
|
}
|
|
|
|
// Token: 0x0400101D RID: 4125
|
|
private object _wrapped;
|
|
}
|
|
}
|