scripts
This commit is contained in:
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Runtime.Remoting.Proxies;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
// Token: 0x02000383 RID: 899
|
||||
internal class ActivationServices
|
||||
{
|
||||
// Token: 0x170006CB RID: 1739
|
||||
// (get) Token: 0x060024F4 RID: 9460 RVA: 0x0007AB98 File Offset: 0x00078D98
|
||||
private static IActivator ConstructionActivator
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ActivationServices._constructionActivator == null)
|
||||
{
|
||||
ActivationServices._constructionActivator = new ConstructionLevelActivator();
|
||||
}
|
||||
return ActivationServices._constructionActivator;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060024F5 RID: 9461 RVA: 0x0007ABB4 File Offset: 0x00078DB4
|
||||
public static IMessage Activate(RemotingProxy proxy, ConstructionCall ctorCall)
|
||||
{
|
||||
ctorCall.SourceProxy = proxy;
|
||||
IMessage message;
|
||||
if (Thread.CurrentContext.HasExitSinks && !ctorCall.IsContextOk)
|
||||
{
|
||||
message = Thread.CurrentContext.GetClientContextSinkChain().SyncProcessMessage(ctorCall);
|
||||
}
|
||||
else
|
||||
{
|
||||
message = ActivationServices.RemoteActivate(ctorCall);
|
||||
}
|
||||
if (message is IConstructionReturnMessage && ((IConstructionReturnMessage)message).Exception == null && proxy.ObjectIdentity == null)
|
||||
{
|
||||
Identity messageTargetIdentity = RemotingServices.GetMessageTargetIdentity(ctorCall);
|
||||
proxy.AttachIdentity(messageTargetIdentity);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x060024F6 RID: 9462 RVA: 0x0007AC34 File Offset: 0x00078E34
|
||||
public static IMessage RemoteActivate(IConstructionCallMessage ctorCall)
|
||||
{
|
||||
IMessage message;
|
||||
try
|
||||
{
|
||||
message = ctorCall.Activator.Activate(ctorCall);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = new ReturnMessage(ex, ctorCall);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x060024F7 RID: 9463 RVA: 0x0007AC88 File Offset: 0x00078E88
|
||||
public static object CreateProxyFromAttributes(Type type, object[] activationAttributes)
|
||||
{
|
||||
string text = null;
|
||||
foreach (object obj in activationAttributes)
|
||||
{
|
||||
if (!(obj is IContextAttribute))
|
||||
{
|
||||
throw new RemotingException("Activation attribute does not implement the IContextAttribute interface");
|
||||
}
|
||||
if (obj is UrlAttribute)
|
||||
{
|
||||
text = ((UrlAttribute)obj).UrlValue;
|
||||
}
|
||||
}
|
||||
if (text != null)
|
||||
{
|
||||
return RemotingServices.CreateClientProxy(type, text, activationAttributes);
|
||||
}
|
||||
ActivatedClientTypeEntry activatedClientTypeEntry = RemotingConfiguration.IsRemotelyActivatedClientType(type);
|
||||
if (activatedClientTypeEntry != null)
|
||||
{
|
||||
return RemotingServices.CreateClientProxy(activatedClientTypeEntry, activationAttributes);
|
||||
}
|
||||
if (type.IsContextful)
|
||||
{
|
||||
return RemotingServices.CreateClientProxyForContextBound(type, activationAttributes);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x060024F8 RID: 9464 RVA: 0x0007AD1C File Offset: 0x00078F1C
|
||||
public static ConstructionCall CreateConstructionCall(Type type, string activationUrl, object[] activationAttributes)
|
||||
{
|
||||
ConstructionCall constructionCall = new ConstructionCall(type);
|
||||
if (!type.IsContextful)
|
||||
{
|
||||
constructionCall.Activator = new AppDomainLevelActivator(activationUrl, ActivationServices.ConstructionActivator);
|
||||
constructionCall.IsContextOk = false;
|
||||
return constructionCall;
|
||||
}
|
||||
IActivator activator = ActivationServices.ConstructionActivator;
|
||||
activator = new ContextLevelActivator(activator);
|
||||
ArrayList arrayList = new ArrayList();
|
||||
if (activationAttributes != null)
|
||||
{
|
||||
arrayList.AddRange(activationAttributes);
|
||||
}
|
||||
bool flag = activationUrl == ChannelServices.CrossContextUrl;
|
||||
Context currentContext = Thread.CurrentContext;
|
||||
if (flag)
|
||||
{
|
||||
foreach (object obj in arrayList)
|
||||
{
|
||||
IContextAttribute contextAttribute = (IContextAttribute)obj;
|
||||
if (!contextAttribute.IsContextOK(currentContext, constructionCall))
|
||||
{
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
object[] customAttributes = type.GetCustomAttributes(true);
|
||||
foreach (object obj2 in customAttributes)
|
||||
{
|
||||
if (obj2 is IContextAttribute)
|
||||
{
|
||||
flag = flag && ((IContextAttribute)obj2).IsContextOK(currentContext, constructionCall);
|
||||
arrayList.Add(obj2);
|
||||
}
|
||||
}
|
||||
if (!flag)
|
||||
{
|
||||
constructionCall.SetActivationAttributes(arrayList.ToArray());
|
||||
foreach (object obj3 in arrayList)
|
||||
{
|
||||
IContextAttribute contextAttribute2 = (IContextAttribute)obj3;
|
||||
contextAttribute2.GetPropertiesForNewContext(constructionCall);
|
||||
}
|
||||
}
|
||||
if (activationUrl != ChannelServices.CrossContextUrl)
|
||||
{
|
||||
activator = new AppDomainLevelActivator(activationUrl, activator);
|
||||
}
|
||||
constructionCall.Activator = activator;
|
||||
constructionCall.IsContextOk = flag;
|
||||
return constructionCall;
|
||||
}
|
||||
|
||||
// Token: 0x060024F9 RID: 9465 RVA: 0x0007AEF8 File Offset: 0x000790F8
|
||||
public static IMessage CreateInstanceFromMessage(IConstructionCallMessage ctorCall)
|
||||
{
|
||||
object obj = ActivationServices.AllocateUninitializedClassInstance(ctorCall.ActivationType);
|
||||
ServerIdentity serverIdentity = (ServerIdentity)RemotingServices.GetMessageTargetIdentity(ctorCall);
|
||||
serverIdentity.AttachServerObject((MarshalByRefObject)obj, Thread.CurrentContext);
|
||||
ConstructionCall constructionCall = ctorCall as ConstructionCall;
|
||||
if (ctorCall.ActivationType.IsContextful && constructionCall != null && constructionCall.SourceProxy != null)
|
||||
{
|
||||
constructionCall.SourceProxy.AttachIdentity(serverIdentity);
|
||||
MarshalByRefObject marshalByRefObject = (MarshalByRefObject)constructionCall.SourceProxy.GetTransparentProxy();
|
||||
RemotingServices.InternalExecuteMessage(marshalByRefObject, ctorCall);
|
||||
}
|
||||
else
|
||||
{
|
||||
ctorCall.MethodBase.Invoke(obj, ctorCall.Args);
|
||||
}
|
||||
return new ConstructionResponse(obj, null, ctorCall);
|
||||
}
|
||||
|
||||
// Token: 0x060024FA RID: 9466 RVA: 0x0007AF9C File Offset: 0x0007919C
|
||||
public static object CreateProxyForType(Type type)
|
||||
{
|
||||
ActivatedClientTypeEntry activatedClientTypeEntry = RemotingConfiguration.IsRemotelyActivatedClientType(type);
|
||||
if (activatedClientTypeEntry != null)
|
||||
{
|
||||
return RemotingServices.CreateClientProxy(activatedClientTypeEntry, null);
|
||||
}
|
||||
WellKnownClientTypeEntry wellKnownClientTypeEntry = RemotingConfiguration.IsWellKnownClientType(type);
|
||||
if (wellKnownClientTypeEntry != null)
|
||||
{
|
||||
return RemotingServices.CreateClientProxy(wellKnownClientTypeEntry);
|
||||
}
|
||||
if (type.IsContextful)
|
||||
{
|
||||
return RemotingServices.CreateClientProxyForContextBound(type, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x060024FB RID: 9467
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern object AllocateUninitializedClassInstance(Type type);
|
||||
|
||||
// Token: 0x060024FC RID: 9468
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern void EnableProxyActivation(Type type, bool enable);
|
||||
|
||||
// Token: 0x04000E92 RID: 3730
|
||||
private static IActivator _constructionActivator;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
/// <summary>Defines the appropriate position for a <see cref="T:System.Activator" /> in the chain of activators.</summary>
|
||||
// Token: 0x02000384 RID: 900
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public enum ActivatorLevel
|
||||
{
|
||||
/// <summary>Constructs a blank object and runs the constructor.</summary>
|
||||
// Token: 0x04000E94 RID: 3732
|
||||
Construction = 4,
|
||||
/// <summary>Finds or creates a suitable context.</summary>
|
||||
// Token: 0x04000E95 RID: 3733
|
||||
Context = 8,
|
||||
/// <summary>Finds or creates a <see cref="T:System.AppDomain" />.</summary>
|
||||
// Token: 0x04000E96 RID: 3734
|
||||
AppDomain = 12,
|
||||
/// <summary>Starts a process.</summary>
|
||||
// Token: 0x04000E97 RID: 3735
|
||||
Process = 16,
|
||||
/// <summary>Finds a suitable computer.</summary>
|
||||
// Token: 0x04000E98 RID: 3736
|
||||
Machine = 20
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
// Token: 0x02000385 RID: 901
|
||||
internal class AppDomainLevelActivator : IActivator
|
||||
{
|
||||
// Token: 0x060024FD RID: 9469 RVA: 0x0007AFE8 File Offset: 0x000791E8
|
||||
public AppDomainLevelActivator(string activationUrl, IActivator next)
|
||||
{
|
||||
this._activationUrl = activationUrl;
|
||||
this._next = next;
|
||||
}
|
||||
|
||||
// Token: 0x170006CC RID: 1740
|
||||
// (get) Token: 0x060024FE RID: 9470 RVA: 0x0007B000 File Offset: 0x00079200
|
||||
public ActivatorLevel Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return ActivatorLevel.AppDomain;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006CD RID: 1741
|
||||
// (get) Token: 0x060024FF RID: 9471 RVA: 0x0007B004 File Offset: 0x00079204
|
||||
// (set) Token: 0x06002500 RID: 9472 RVA: 0x0007B00C File Offset: 0x0007920C
|
||||
public IActivator NextActivator
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._next = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002501 RID: 9473 RVA: 0x0007B018 File Offset: 0x00079218
|
||||
public IConstructionReturnMessage Activate(IConstructionCallMessage ctorCall)
|
||||
{
|
||||
IActivator activator = (IActivator)RemotingServices.Connect(typeof(IActivator), this._activationUrl);
|
||||
ctorCall.Activator = ctorCall.Activator.NextActivator;
|
||||
IConstructionReturnMessage constructionReturnMessage;
|
||||
try
|
||||
{
|
||||
constructionReturnMessage = activator.Activate(ctorCall);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ConstructionResponse(ex, ctorCall);
|
||||
}
|
||||
ObjRef objRef = (ObjRef)constructionReturnMessage.ReturnValue;
|
||||
if (RemotingServices.GetIdentityForUri(objRef.URI) != null)
|
||||
{
|
||||
throw new RemotingException("Inconsistent state during activation; there may be two proxies for the same object");
|
||||
}
|
||||
object obj;
|
||||
Identity orCreateClientIdentity = RemotingServices.GetOrCreateClientIdentity(objRef, null, out obj);
|
||||
RemotingServices.SetMessageTargetIdentity(ctorCall, orCreateClientIdentity);
|
||||
return constructionReturnMessage;
|
||||
}
|
||||
|
||||
// Token: 0x04000E99 RID: 3737
|
||||
private string _activationUrl;
|
||||
|
||||
// Token: 0x04000E9A RID: 3738
|
||||
private IActivator _next;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
// Token: 0x02000386 RID: 902
|
||||
[Serializable]
|
||||
internal class ConstructionLevelActivator : IActivator
|
||||
{
|
||||
// Token: 0x170006CE RID: 1742
|
||||
// (get) Token: 0x06002503 RID: 9475 RVA: 0x0007B0D4 File Offset: 0x000792D4
|
||||
public ActivatorLevel Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return ActivatorLevel.Construction;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006CF RID: 1743
|
||||
// (get) Token: 0x06002504 RID: 9476 RVA: 0x0007B0D8 File Offset: 0x000792D8
|
||||
// (set) Token: 0x06002505 RID: 9477 RVA: 0x0007B0DC File Offset: 0x000792DC
|
||||
public IActivator NextActivator
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002506 RID: 9478 RVA: 0x0007B0E0 File Offset: 0x000792E0
|
||||
public IConstructionReturnMessage Activate(IConstructionCallMessage msg)
|
||||
{
|
||||
return (IConstructionReturnMessage)Thread.CurrentContext.GetServerContextSinkChain().SyncProcessMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
// Token: 0x02000387 RID: 903
|
||||
[Serializable]
|
||||
internal class ContextLevelActivator : IActivator
|
||||
{
|
||||
// Token: 0x06002507 RID: 9479 RVA: 0x0007B0F8 File Offset: 0x000792F8
|
||||
public ContextLevelActivator(IActivator next)
|
||||
{
|
||||
this.m_NextActivator = next;
|
||||
}
|
||||
|
||||
// Token: 0x170006D0 RID: 1744
|
||||
// (get) Token: 0x06002508 RID: 9480 RVA: 0x0007B108 File Offset: 0x00079308
|
||||
public ActivatorLevel Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return ActivatorLevel.Context;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006D1 RID: 1745
|
||||
// (get) Token: 0x06002509 RID: 9481 RVA: 0x0007B10C File Offset: 0x0007930C
|
||||
// (set) Token: 0x0600250A RID: 9482 RVA: 0x0007B114 File Offset: 0x00079314
|
||||
public IActivator NextActivator
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_NextActivator;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_NextActivator = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600250B RID: 9483 RVA: 0x0007B120 File Offset: 0x00079320
|
||||
public IConstructionReturnMessage Activate(IConstructionCallMessage ctorCall)
|
||||
{
|
||||
ServerIdentity serverIdentity = RemotingServices.CreateContextBoundObjectIdentity(ctorCall.ActivationType);
|
||||
RemotingServices.SetMessageTargetIdentity(ctorCall, serverIdentity);
|
||||
ConstructionCall constructionCall = ctorCall as ConstructionCall;
|
||||
if (constructionCall == null || !constructionCall.IsContextOk)
|
||||
{
|
||||
serverIdentity.Context = Context.CreateNewContext(ctorCall);
|
||||
Context context = Context.SwitchToContext(serverIdentity.Context);
|
||||
try
|
||||
{
|
||||
return this.m_NextActivator.Activate(ctorCall);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Context.SwitchToContext(context);
|
||||
}
|
||||
}
|
||||
return this.m_NextActivator.Activate(ctorCall);
|
||||
}
|
||||
|
||||
// Token: 0x04000E9B RID: 3739
|
||||
private IActivator m_NextActivator;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
/// <summary>Provides the basic functionality for a remoting activator class.</summary>
|
||||
// Token: 0x02000388 RID: 904
|
||||
[ComVisible(true)]
|
||||
public interface IActivator
|
||||
{
|
||||
/// <summary>Gets the <see cref="T:System.Runtime.Remoting.Activation.ActivatorLevel" /> where this activator is active.</summary>
|
||||
/// <returns>The <see cref="T:System.Runtime.Remoting.Activation.ActivatorLevel" /> where this activator is active.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D2 RID: 1746
|
||||
// (get) Token: 0x0600250C RID: 9484
|
||||
ActivatorLevel Level { get; }
|
||||
|
||||
/// <summary>Gets or sets the next activator in the chain.</summary>
|
||||
/// <returns>The next activator in the chain.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D3 RID: 1747
|
||||
// (get) Token: 0x0600250D RID: 9485
|
||||
// (set) Token: 0x0600250E RID: 9486
|
||||
IActivator NextActivator { get; set; }
|
||||
|
||||
/// <summary>Creates an instance of the object that is specified in the provided <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" />.</summary>
|
||||
/// <returns>Status of the object activation contained in a <see cref="T:System.Runtime.Remoting.Activation.IConstructionReturnMessage" />.</returns>
|
||||
/// <param name="msg">The information about the object that is needed to activate it, stored in a <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" />. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x0600250F RID: 9487
|
||||
IConstructionReturnMessage Activate(IConstructionCallMessage msg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
/// <summary>Represents the construction call request of an object.</summary>
|
||||
// Token: 0x02000389 RID: 905
|
||||
[ComVisible(true)]
|
||||
public interface IConstructionCallMessage : IMessage, IMethodCallMessage, IMethodMessage
|
||||
{
|
||||
/// <summary>Gets the type of the remote object to activate.</summary>
|
||||
/// <returns>The type of the remote object to activate.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D4 RID: 1748
|
||||
// (get) Token: 0x06002510 RID: 9488
|
||||
Type ActivationType { get; }
|
||||
|
||||
/// <summary>Gets the full type name of the remote type to activate.</summary>
|
||||
/// <returns>The full type name of the remote type to activate.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D5 RID: 1749
|
||||
// (get) Token: 0x06002511 RID: 9489
|
||||
string ActivationTypeName { get; }
|
||||
|
||||
/// <summary>Gets or sets the activator that activates the remote object.</summary>
|
||||
/// <returns>The activator that activates the remote object.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D6 RID: 1750
|
||||
// (get) Token: 0x06002512 RID: 9490
|
||||
// (set) Token: 0x06002513 RID: 9491
|
||||
IActivator Activator { get; set; }
|
||||
|
||||
/// <summary>Gets the call site activation attributes.</summary>
|
||||
/// <returns>The call site activation attributes.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D7 RID: 1751
|
||||
// (get) Token: 0x06002514 RID: 9492
|
||||
object[] CallSiteActivationAttributes { get; }
|
||||
|
||||
/// <summary>Gets a list of context properties that define the context in which the object is to be created.</summary>
|
||||
/// <returns>A list of properties of the context in which to construct the object.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006D8 RID: 1752
|
||||
// (get) Token: 0x06002515 RID: 9493
|
||||
IList ContextProperties { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
/// <summary>Identifies a <see cref="T:System.Runtime.Remoting.Messaging.IMethodReturnMessage" /> that is returned after attempting to activate a remote object.</summary>
|
||||
// Token: 0x0200038A RID: 906
|
||||
[ComVisible(true)]
|
||||
public interface IConstructionReturnMessage : IMessage, IMethodMessage, IMethodReturnMessage
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
// Token: 0x0200038B RID: 907
|
||||
internal class RemoteActivationAttribute : Attribute, IContextAttribute
|
||||
{
|
||||
// Token: 0x06002516 RID: 9494 RVA: 0x0007B1BC File Offset: 0x000793BC
|
||||
public RemoteActivationAttribute()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002517 RID: 9495 RVA: 0x0007B1C4 File Offset: 0x000793C4
|
||||
public RemoteActivationAttribute(IList contextProperties)
|
||||
{
|
||||
this._contextProperties = contextProperties;
|
||||
}
|
||||
|
||||
// Token: 0x06002518 RID: 9496 RVA: 0x0007B1D4 File Offset: 0x000793D4
|
||||
public bool IsContextOK(Context ctx, IConstructionCallMessage ctor)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06002519 RID: 9497 RVA: 0x0007B1D8 File Offset: 0x000793D8
|
||||
public void GetPropertiesForNewContext(IConstructionCallMessage ctor)
|
||||
{
|
||||
if (this._contextProperties != null)
|
||||
{
|
||||
foreach (object obj in this._contextProperties)
|
||||
{
|
||||
ctor.ContextProperties.Add(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000E9C RID: 3740
|
||||
private IList _contextProperties;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
// Token: 0x0200038C RID: 908
|
||||
internal class RemoteActivator : MarshalByRefObject, IActivator
|
||||
{
|
||||
// Token: 0x0600251B RID: 9499 RVA: 0x0007B25C File Offset: 0x0007945C
|
||||
public IConstructionReturnMessage Activate(IConstructionCallMessage msg)
|
||||
{
|
||||
if (!RemotingConfiguration.IsActivationAllowed(msg.ActivationType))
|
||||
{
|
||||
throw new RemotingException("The type " + msg.ActivationTypeName + " is not allowed to be client activated");
|
||||
}
|
||||
object[] array = new object[]
|
||||
{
|
||||
new RemoteActivationAttribute(msg.ContextProperties)
|
||||
};
|
||||
MarshalByRefObject marshalByRefObject = (MarshalByRefObject)Activator.CreateInstance(msg.ActivationType, msg.Args, array);
|
||||
ObjRef objRef = RemotingServices.Marshal(marshalByRefObject);
|
||||
return new ConstructionResponse(objRef, null, msg);
|
||||
}
|
||||
|
||||
// Token: 0x0600251C RID: 9500 RVA: 0x0007B2D0 File Offset: 0x000794D0
|
||||
public override object InitializeLifetimeService()
|
||||
{
|
||||
ILease lease = (ILease)base.InitializeLifetimeService();
|
||||
if (lease.CurrentState == LeaseState.Initial)
|
||||
{
|
||||
lease.InitialLeaseTime = TimeSpan.FromMinutes(30.0);
|
||||
lease.SponsorshipTimeout = TimeSpan.FromMinutes(1.0);
|
||||
lease.RenewOnCallTime = TimeSpan.FromMinutes(10.0);
|
||||
}
|
||||
return lease;
|
||||
}
|
||||
|
||||
// Token: 0x170006D9 RID: 1753
|
||||
// (get) Token: 0x0600251D RID: 9501 RVA: 0x0007B334 File Offset: 0x00079534
|
||||
public ActivatorLevel Level
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006DA RID: 1754
|
||||
// (get) Token: 0x0600251E RID: 9502 RVA: 0x0007B33C File Offset: 0x0007953C
|
||||
// (set) Token: 0x0600251F RID: 9503 RVA: 0x0007B344 File Offset: 0x00079544
|
||||
public IActivator NextActivator
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
|
||||
namespace System.Runtime.Remoting.Activation
|
||||
{
|
||||
/// <summary>Defines an attribute that can be used at the call site to specify the URL where the activation will happen. This class cannot be inherited.</summary>
|
||||
// Token: 0x0200038D RID: 909
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public sealed class UrlAttribute : ContextAttribute
|
||||
{
|
||||
/// <summary>Creates a new instance of the <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> class.</summary>
|
||||
/// <param name="callsiteURL">The call site URL. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="callsiteURL" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x06002520 RID: 9504 RVA: 0x0007B34C File Offset: 0x0007954C
|
||||
public UrlAttribute(string callsiteURL)
|
||||
: base(callsiteURL)
|
||||
{
|
||||
this.url = callsiteURL;
|
||||
}
|
||||
|
||||
/// <summary>Gets the URL value of the <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</summary>
|
||||
/// <returns>The URL value of the <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006DB RID: 1755
|
||||
// (get) Token: 0x06002521 RID: 9505 RVA: 0x0007B35C File Offset: 0x0007955C
|
||||
public string UrlValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Checks whether the specified object refers to the same URL as the current instance.</summary>
|
||||
/// <returns>true if the object is a <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> with the same value; otherwise, false.</returns>
|
||||
/// <param name="o">The object to compare to the current <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002522 RID: 9506 RVA: 0x0007B364 File Offset: 0x00079564
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return o is UrlAttribute && ((UrlAttribute)o).UrlValue == this.url;
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash value for the current <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</summary>
|
||||
/// <returns>The hash value for the current <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002523 RID: 9507 RVA: 0x0007B38C File Offset: 0x0007958C
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.url.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Forces the creation of the context and the server object inside the context at the specified URL.</summary>
|
||||
/// <param name="ctorMsg">The <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" /> of the server object to create. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002524 RID: 9508 RVA: 0x0007B39C File Offset: 0x0007959C
|
||||
[ComVisible(true)]
|
||||
public override void GetPropertiesForNewContext(IConstructionCallMessage ctorMsg)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns a Boolean value that indicates whether the specified <see cref="T:System.Runtime.Remoting.Contexts.Context" /> meets <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />'s requirements.</summary>
|
||||
/// <returns>true if the passed-in context is acceptable; otherwise, false.</returns>
|
||||
/// <param name="ctx">The context to check against the current context attribute. </param>
|
||||
/// <param name="msg">The construction call, the parameters of which need to be checked against the current context. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002525 RID: 9509 RVA: 0x0007B3A0 File Offset: 0x000795A0
|
||||
[ComVisible(true)]
|
||||
public override bool IsContextOK(Context ctx, IConstructionCallMessage msg)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x04000E9D RID: 3741
|
||||
private string url;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user