scripts
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Holds values for an object type registered on the client end as a type that can be activated on the server.</summary>
|
||||
// Token: 0x02000438 RID: 1080
|
||||
[ComVisible(true)]
|
||||
public class ActivatedClientTypeEntry : TypeEntry
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.ActivatedClientTypeEntry" /> class with the given <see cref="T:System.Type" /> and application URL.</summary>
|
||||
/// <param name="type">The <see cref="T:System.Type" /> of the client activated type. </param>
|
||||
/// <param name="appUrl">The URL of the application to activate the type in. </param>
|
||||
// Token: 0x060029B5 RID: 10677 RVA: 0x000862E8 File Offset: 0x000844E8
|
||||
public ActivatedClientTypeEntry(Type type, string appUrl)
|
||||
{
|
||||
base.AssemblyName = type.Assembly.FullName;
|
||||
base.TypeName = type.FullName;
|
||||
this.applicationUrl = appUrl;
|
||||
this.obj_type = type;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.ActivatedClientTypeEntry" /> class with the given type name, assembly name, and application URL.</summary>
|
||||
/// <param name="typeName">The type name of the client activated type. </param>
|
||||
/// <param name="assemblyName">The assembly name of the client activated type. </param>
|
||||
/// <param name="appUrl">The URL of the application to activate the type in. </param>
|
||||
// Token: 0x060029B6 RID: 10678 RVA: 0x00086328 File Offset: 0x00084528
|
||||
public ActivatedClientTypeEntry(string typeName, string assemblyName, string appUrl)
|
||||
{
|
||||
base.AssemblyName = assemblyName;
|
||||
base.TypeName = typeName;
|
||||
this.applicationUrl = appUrl;
|
||||
Assembly assembly = Assembly.Load(assemblyName);
|
||||
this.obj_type = assembly.GetType(typeName);
|
||||
if (this.obj_type == null)
|
||||
{
|
||||
throw new RemotingException("Type not found: " + typeName + ", " + assemblyName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the URL of the application to activate the type in.</summary>
|
||||
/// <returns>The URL of the application to activate the type in.</returns>
|
||||
// Token: 0x17000840 RID: 2112
|
||||
// (get) Token: 0x060029B7 RID: 10679 RVA: 0x00086388 File Offset: 0x00084588
|
||||
public string ApplicationUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.applicationUrl;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the context attributes for the client-activated type.</summary>
|
||||
/// <returns>The context attributes for the client activated type.</returns>
|
||||
// Token: 0x17000841 RID: 2113
|
||||
// (get) Token: 0x060029B8 RID: 10680 RVA: 0x00086390 File Offset: 0x00084590
|
||||
// (set) Token: 0x060029B9 RID: 10681 RVA: 0x00086394 File Offset: 0x00084594
|
||||
public IContextAttribute[] ContextAttributes
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Type" /> of the client-activated type.</summary>
|
||||
/// <returns>Gets the <see cref="T:System.Type" /> of the client-activated type.</returns>
|
||||
// Token: 0x17000842 RID: 2114
|
||||
// (get) Token: 0x060029BA RID: 10682 RVA: 0x00086398 File Offset: 0x00084598
|
||||
public Type ObjectType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.obj_type;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns the type name, assembly name, and application URL of the client-activated type as a <see cref="T:System.String" />.</summary>
|
||||
/// <returns>The type name, assembly name, and application URL of the client-activated type as a <see cref="T:System.String" />.</returns>
|
||||
// Token: 0x060029BB RID: 10683 RVA: 0x000863A0 File Offset: 0x000845A0
|
||||
public override string ToString()
|
||||
{
|
||||
return base.TypeName + base.AssemblyName + this.ApplicationUrl;
|
||||
}
|
||||
|
||||
// Token: 0x04001003 RID: 4099
|
||||
private string applicationUrl;
|
||||
|
||||
// Token: 0x04001004 RID: 4100
|
||||
private Type obj_type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Holds values for an object type registered on the service end as one that can be activated on request from a client.</summary>
|
||||
// Token: 0x02000439 RID: 1081
|
||||
[ComVisible(true)]
|
||||
public class ActivatedServiceTypeEntry : TypeEntry
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.ActivatedServiceTypeEntry" /> class with the given <see cref="T:System.Type" />.</summary>
|
||||
/// <param name="type">The <see cref="T:System.Type" /> of the client-activated service type. </param>
|
||||
// Token: 0x060029BC RID: 10684 RVA: 0x000863C4 File Offset: 0x000845C4
|
||||
public ActivatedServiceTypeEntry(Type type)
|
||||
{
|
||||
base.AssemblyName = type.Assembly.FullName;
|
||||
base.TypeName = type.FullName;
|
||||
this.obj_type = type;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.ActivatedServiceTypeEntry" /> class with the given type name and assembly name.</summary>
|
||||
/// <param name="typeName">The type name of the client-activated service type. </param>
|
||||
/// <param name="assemblyName">The assembly name of the client-activated service type. </param>
|
||||
// Token: 0x060029BD RID: 10685 RVA: 0x000863FC File Offset: 0x000845FC
|
||||
public ActivatedServiceTypeEntry(string typeName, string assemblyName)
|
||||
{
|
||||
base.AssemblyName = assemblyName;
|
||||
base.TypeName = typeName;
|
||||
Assembly assembly = Assembly.Load(assemblyName);
|
||||
this.obj_type = assembly.GetType(typeName);
|
||||
if (this.obj_type == null)
|
||||
{
|
||||
throw new RemotingException("Type not found: " + typeName + ", " + assemblyName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the context attributes for the client-activated service type.</summary>
|
||||
/// <returns>The context attributes for the client-activated service type.</returns>
|
||||
// Token: 0x17000843 RID: 2115
|
||||
// (get) Token: 0x060029BE RID: 10686 RVA: 0x00086454 File Offset: 0x00084654
|
||||
// (set) Token: 0x060029BF RID: 10687 RVA: 0x00086458 File Offset: 0x00084658
|
||||
public IContextAttribute[] ContextAttributes
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Type" /> of the client-activated service type.</summary>
|
||||
/// <returns>The <see cref="T:System.Type" /> of the client-activated service type.</returns>
|
||||
// Token: 0x17000844 RID: 2116
|
||||
// (get) Token: 0x060029C0 RID: 10688 RVA: 0x0008645C File Offset: 0x0008465C
|
||||
public Type ObjectType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.obj_type;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns the type and assembly name of the client-activated service type as a <see cref="T:System.String" />.</summary>
|
||||
/// <returns>The type and assembly name of the client-activated service type as a <see cref="T:System.String" />.</returns>
|
||||
// Token: 0x060029C1 RID: 10689 RVA: 0x00086464 File Offset: 0x00084664
|
||||
public override string ToString()
|
||||
{
|
||||
return base.AssemblyName + base.TypeName;
|
||||
}
|
||||
|
||||
// Token: 0x04001005 RID: 4101
|
||||
private Type obj_type;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000447 RID: 1095
|
||||
internal class ChannelData
|
||||
{
|
||||
// Token: 0x1700085F RID: 2143
|
||||
// (get) Token: 0x06002A40 RID: 10816 RVA: 0x00088830 File Offset: 0x00086A30
|
||||
internal ArrayList ServerProviders
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._serverProviders == null)
|
||||
{
|
||||
this._serverProviders = new ArrayList();
|
||||
}
|
||||
return this._serverProviders;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000860 RID: 2144
|
||||
// (get) Token: 0x06002A41 RID: 10817 RVA: 0x00088850 File Offset: 0x00086A50
|
||||
public ArrayList ClientProviders
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._clientProviders == null)
|
||||
{
|
||||
this._clientProviders = new ArrayList();
|
||||
}
|
||||
return this._clientProviders;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000861 RID: 2145
|
||||
// (get) Token: 0x06002A42 RID: 10818 RVA: 0x00088870 File Offset: 0x00086A70
|
||||
public Hashtable CustomProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._customProperties == null)
|
||||
{
|
||||
this._customProperties = new Hashtable();
|
||||
}
|
||||
return this._customProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002A43 RID: 10819 RVA: 0x00088890 File Offset: 0x00086A90
|
||||
public void CopyFrom(ChannelData other)
|
||||
{
|
||||
if (this.Ref == null)
|
||||
{
|
||||
this.Ref = other.Ref;
|
||||
}
|
||||
if (this.Id == null)
|
||||
{
|
||||
this.Id = other.Id;
|
||||
}
|
||||
if (this.Type == null)
|
||||
{
|
||||
this.Type = other.Type;
|
||||
}
|
||||
if (this.DelayLoadAsClientChannel == null)
|
||||
{
|
||||
this.DelayLoadAsClientChannel = other.DelayLoadAsClientChannel;
|
||||
}
|
||||
if (other._customProperties != null)
|
||||
{
|
||||
foreach (object obj in other._customProperties)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
if (!this.CustomProperties.ContainsKey(dictionaryEntry.Key))
|
||||
{
|
||||
this.CustomProperties[dictionaryEntry.Key] = dictionaryEntry.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this._serverProviders == null && other._serverProviders != null)
|
||||
{
|
||||
foreach (object obj2 in other._serverProviders)
|
||||
{
|
||||
ProviderData providerData = (ProviderData)obj2;
|
||||
ProviderData providerData2 = new ProviderData();
|
||||
providerData2.CopyFrom(providerData);
|
||||
this.ServerProviders.Add(providerData2);
|
||||
}
|
||||
}
|
||||
if (this._clientProviders == null && other._clientProviders != null)
|
||||
{
|
||||
foreach (object obj3 in other._clientProviders)
|
||||
{
|
||||
ProviderData providerData3 = (ProviderData)obj3;
|
||||
ProviderData providerData4 = new ProviderData();
|
||||
providerData4.CopyFrom(providerData3);
|
||||
this.ClientProviders.Add(providerData4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04001035 RID: 4149
|
||||
internal string Ref;
|
||||
|
||||
// Token: 0x04001036 RID: 4150
|
||||
internal string Type;
|
||||
|
||||
// Token: 0x04001037 RID: 4151
|
||||
internal string Id;
|
||||
|
||||
// Token: 0x04001038 RID: 4152
|
||||
internal string DelayLoadAsClientChannel;
|
||||
|
||||
// Token: 0x04001039 RID: 4153
|
||||
private ArrayList _serverProviders = new ArrayList();
|
||||
|
||||
// Token: 0x0400103A RID: 4154
|
||||
private ArrayList _clientProviders = new ArrayList();
|
||||
|
||||
// Token: 0x0400103B RID: 4155
|
||||
private Hashtable _customProperties = new Hashtable();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000394 RID: 916
|
||||
[Serializable]
|
||||
internal class ChannelInfo : IChannelInfo
|
||||
{
|
||||
// Token: 0x06002558 RID: 9560 RVA: 0x0007B90C File Offset: 0x00079B0C
|
||||
public ChannelInfo()
|
||||
{
|
||||
this.channelData = ChannelServices.GetCurrentChannelInfo();
|
||||
}
|
||||
|
||||
// Token: 0x06002559 RID: 9561 RVA: 0x0007B920 File Offset: 0x00079B20
|
||||
public ChannelInfo(object remoteChannelData)
|
||||
{
|
||||
this.channelData = new object[] { remoteChannelData };
|
||||
}
|
||||
|
||||
// Token: 0x170006F4 RID: 1780
|
||||
// (get) Token: 0x0600255A RID: 9562 RVA: 0x0007B938 File Offset: 0x00079B38
|
||||
// (set) Token: 0x0600255B RID: 9563 RVA: 0x0007B940 File Offset: 0x00079B40
|
||||
public object[] ChannelData
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.channelData;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.channelData = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EA8 RID: 3752
|
||||
private object[] channelData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x0200038E RID: 910
|
||||
[ComVisible(true)]
|
||||
internal class AggregateDictionary : IEnumerable, ICollection, IDictionary
|
||||
{
|
||||
// Token: 0x06002526 RID: 9510 RVA: 0x0007B3A4 File Offset: 0x000795A4
|
||||
public AggregateDictionary(IDictionary[] dics)
|
||||
{
|
||||
this.dictionaries = dics;
|
||||
}
|
||||
|
||||
// Token: 0x06002527 RID: 9511 RVA: 0x0007B3B4 File Offset: 0x000795B4
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new AggregateEnumerator(this.dictionaries);
|
||||
}
|
||||
|
||||
// Token: 0x170006DC RID: 1756
|
||||
// (get) Token: 0x06002528 RID: 9512 RVA: 0x0007B3C4 File Offset: 0x000795C4
|
||||
public bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006DD RID: 1757
|
||||
// (get) Token: 0x06002529 RID: 9513 RVA: 0x0007B3C8 File Offset: 0x000795C8
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006DE RID: 1758
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (IDictionary dictionary in this.dictionaries)
|
||||
{
|
||||
if (dictionary.Contains(key))
|
||||
{
|
||||
return dictionary[key];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006DF RID: 1759
|
||||
// (get) Token: 0x0600252C RID: 9516 RVA: 0x0007B418 File Offset: 0x00079618
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._keys != null)
|
||||
{
|
||||
return this._keys;
|
||||
}
|
||||
this._keys = new ArrayList();
|
||||
foreach (IDictionary dictionary in this.dictionaries)
|
||||
{
|
||||
this._keys.AddRange(dictionary.Keys);
|
||||
}
|
||||
return this._keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E0 RID: 1760
|
||||
// (get) Token: 0x0600252D RID: 9517 RVA: 0x0007B478 File Offset: 0x00079678
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._values != null)
|
||||
{
|
||||
return this._values;
|
||||
}
|
||||
this._values = new ArrayList();
|
||||
foreach (IDictionary dictionary in this.dictionaries)
|
||||
{
|
||||
this._values.AddRange(dictionary.Values);
|
||||
}
|
||||
return this._values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600252E RID: 9518 RVA: 0x0007B4D8 File Offset: 0x000796D8
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600252F RID: 9519 RVA: 0x0007B4E0 File Offset: 0x000796E0
|
||||
public void Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06002530 RID: 9520 RVA: 0x0007B4E8 File Offset: 0x000796E8
|
||||
public bool Contains(object ob)
|
||||
{
|
||||
foreach (IDictionary dictionary in this.dictionaries)
|
||||
{
|
||||
if (dictionary.Contains(ob))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06002531 RID: 9521 RVA: 0x0007B524 File Offset: 0x00079724
|
||||
public IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new AggregateEnumerator(this.dictionaries);
|
||||
}
|
||||
|
||||
// Token: 0x06002532 RID: 9522 RVA: 0x0007B534 File Offset: 0x00079734
|
||||
public void Remove(object ob)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06002533 RID: 9523 RVA: 0x0007B53C File Offset: 0x0007973C
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
foreach (object obj in this)
|
||||
{
|
||||
array.SetValue(obj, index++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E1 RID: 1761
|
||||
// (get) Token: 0x06002534 RID: 9524 RVA: 0x0007B5A8 File Offset: 0x000797A8
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
int num = 0;
|
||||
foreach (IDictionary dictionary in this.dictionaries)
|
||||
{
|
||||
num += dictionary.Count;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E2 RID: 1762
|
||||
// (get) Token: 0x06002535 RID: 9525 RVA: 0x0007B5E0 File Offset: 0x000797E0
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E3 RID: 1763
|
||||
// (get) Token: 0x06002536 RID: 9526 RVA: 0x0007B5E4 File Offset: 0x000797E4
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000E9E RID: 3742
|
||||
private IDictionary[] dictionaries;
|
||||
|
||||
// Token: 0x04000E9F RID: 3743
|
||||
private ArrayList _values;
|
||||
|
||||
// Token: 0x04000EA0 RID: 3744
|
||||
private ArrayList _keys;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x0200038F RID: 911
|
||||
internal class AggregateEnumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x06002537 RID: 9527 RVA: 0x0007B5E8 File Offset: 0x000797E8
|
||||
public AggregateEnumerator(IDictionary[] dics)
|
||||
{
|
||||
this.dictionaries = dics;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x170006E4 RID: 1764
|
||||
// (get) Token: 0x06002538 RID: 9528 RVA: 0x0007B600 File Offset: 0x00079800
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.currente.Entry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E5 RID: 1765
|
||||
// (get) Token: 0x06002539 RID: 9529 RVA: 0x0007B610 File Offset: 0x00079810
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.currente.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E6 RID: 1766
|
||||
// (get) Token: 0x0600253A RID: 9530 RVA: 0x0007B620 File Offset: 0x00079820
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.currente.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006E7 RID: 1767
|
||||
// (get) Token: 0x0600253B RID: 9531 RVA: 0x0007B630 File Offset: 0x00079830
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.currente.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600253C RID: 9532 RVA: 0x0007B640 File Offset: 0x00079840
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.pos >= this.dictionaries.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.currente.MoveNext())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
this.pos++;
|
||||
if (this.pos >= this.dictionaries.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.currente = this.dictionaries[this.pos].GetEnumerator();
|
||||
return this.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x0600253D RID: 9533 RVA: 0x0007B6B8 File Offset: 0x000798B8
|
||||
public void Reset()
|
||||
{
|
||||
this.pos = 0;
|
||||
if (this.dictionaries.Length > 0)
|
||||
{
|
||||
this.currente = this.dictionaries[0].GetEnumerator();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EA1 RID: 3745
|
||||
private IDictionary[] dictionaries;
|
||||
|
||||
// Token: 0x04000EA2 RID: 3746
|
||||
private int pos;
|
||||
|
||||
// Token: 0x04000EA3 RID: 3747
|
||||
private IDictionaryEnumerator currente;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x0200039E RID: 926
|
||||
internal class AsyncRequest
|
||||
{
|
||||
// Token: 0x0600259A RID: 9626 RVA: 0x0007CD44 File Offset: 0x0007AF44
|
||||
public AsyncRequest(IMessage msgRequest, IMessageSink replySink)
|
||||
{
|
||||
this.ReplySink = replySink;
|
||||
this.MsgRequest = msgRequest;
|
||||
}
|
||||
|
||||
// Token: 0x04000EC0 RID: 3776
|
||||
internal IMessageSink ReplySink;
|
||||
|
||||
// Token: 0x04000EC1 RID: 3777
|
||||
internal IMessage MsgRequest;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides a base implementation of a channel object that exposes a dictionary interface to its properties.</summary>
|
||||
// Token: 0x02000390 RID: 912
|
||||
[ComVisible(true)]
|
||||
public abstract class BaseChannelObjectWithProperties : IEnumerable, ICollection, IDictionary
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties" /> class.</summary>
|
||||
// Token: 0x0600253E RID: 9534 RVA: 0x0007B6F0 File Offset: 0x000798F0
|
||||
protected BaseChannelObjectWithProperties()
|
||||
{
|
||||
this.table = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.IEnumerator" /> that enumerates over all the properties that are associated with the channel object.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IEnumerator" /> that enumerates over all the properties that are associated with the channel object.</returns>
|
||||
// Token: 0x0600253F RID: 9535 RVA: 0x0007B704 File Offset: 0x00079904
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.table.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of properties associated with the channel object.</summary>
|
||||
/// <returns>The number of properties associated with the channel object.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006E8 RID: 1768
|
||||
// (get) Token: 0x06002540 RID: 9536 RVA: 0x0007B714 File Offset: 0x00079914
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether the number of properties that can be entered into the channel object is fixed.</summary>
|
||||
/// <returns>true if the number of properties that can be entered into the channel object is fixed; otherwise, false.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006E9 RID: 1769
|
||||
// (get) Token: 0x06002541 RID: 9537 RVA: 0x0007B724 File Offset: 0x00079924
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether the collection of properties in the channel object is read-only.</summary>
|
||||
/// <returns>true if the collection of properties in the channel object is read-only; otherwise, false.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006EA RID: 1770
|
||||
// (get) Token: 0x06002542 RID: 9538 RVA: 0x0007B728 File Offset: 0x00079928
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether the dictionary of channel object properties is synchronized.</summary>
|
||||
/// <returns>true if the dictionary of channel object properties is synchronized; otherwise, false.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006EB RID: 1771
|
||||
// (get) Token: 0x06002543 RID: 9539 RVA: 0x0007B72C File Offset: 0x0007992C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>When overridden in a derived class, gets or sets the property that is associated with the specified key.</summary>
|
||||
/// <returns>The property that is associated with the specified key.</returns>
|
||||
/// <param name="key">The key of the property to get or set. </param>
|
||||
/// <exception cref="T:System.NotImplementedException">The property is accessed. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006EC RID: 1772
|
||||
public virtual object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>When overridden in a derived class, gets a <see cref="T:System.Collections.ICollection" /> of keys that the channel object properties are associated with.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.ICollection" /> of keys that the channel object properties are associated with.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006ED RID: 1773
|
||||
// (get) Token: 0x06002546 RID: 9542 RVA: 0x0007B740 File Offset: 0x00079940
|
||||
public virtual ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Collections.IDictionary" /> of the channel properties associated with the channel object.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IDictionary" /> of the channel properties associated with the channel object.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x170006EE RID: 1774
|
||||
// (get) Token: 0x06002547 RID: 9543 RVA: 0x0007B750 File Offset: 0x00079950
|
||||
public virtual IDictionary Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that is used to synchronize access to the <see cref="T:System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties" />.</summary>
|
||||
/// <returns>An object that is used to synchronize access to the <see cref="T:System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties" />.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006EF RID: 1775
|
||||
// (get) Token: 0x06002548 RID: 9544 RVA: 0x0007B754 File Offset: 0x00079954
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Collections.ICollection" /> of the values of the properties associated with the channel object.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.ICollection" /> of the values of the properties associated with the channel object.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006F0 RID: 1776
|
||||
// (get) Token: 0x06002549 RID: 9545 RVA: 0x0007B758 File Offset: 0x00079958
|
||||
public virtual ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <param name="key">The key that is associated with the object in the <paramref name="value" /> parameter. </param>
|
||||
/// <param name="value">The value to add. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The method is called. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600254A RID: 9546 RVA: 0x0007B768 File Offset: 0x00079968
|
||||
public virtual void Add(object key, object value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The method is called. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600254B RID: 9547 RVA: 0x0007B770 File Offset: 0x00079970
|
||||
public virtual void Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Returns a value that indicates whether the channel object contains a property that is associated with the specified key.</summary>
|
||||
/// <returns>true if the channel object contains a property associated with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key of the property to look for. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600254C RID: 9548 RVA: 0x0007B778 File Offset: 0x00079978
|
||||
public virtual bool Contains(object key)
|
||||
{
|
||||
return this.table.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <param name="array">The array to copy the properties to. </param>
|
||||
/// <param name="index">The index at which to begin copying. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The method is called. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600254D RID: 9549 RVA: 0x0007B788 File Offset: 0x00079988
|
||||
public virtual void CopyTo(Array array, int index)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.IDictionaryEnumerator" /> that enumerates over all the properties associated with the channel object.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IDictionaryEnumerator" /> that enumerates over all the properties associated with the channel object.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600254E RID: 9550 RVA: 0x0007B790 File Offset: 0x00079990
|
||||
public virtual IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return this.table.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <param name="key">The key of the object to be removed. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The method is called. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600254F RID: 9551 RVA: 0x0007B7A0 File Offset: 0x000799A0
|
||||
public virtual void Remove(object key)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x04000EA4 RID: 3748
|
||||
private Hashtable table;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides a base implementation for channel sinks that want to expose a dictionary interface to their properties.</summary>
|
||||
// Token: 0x02000391 RID: 913
|
||||
[ComVisible(true)]
|
||||
public abstract class BaseChannelSinkWithProperties : BaseChannelObjectWithProperties
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides a base implementation for channels that want to expose a dictionary interface to their properties.</summary>
|
||||
// Token: 0x02000392 RID: 914
|
||||
[ComVisible(true)]
|
||||
public abstract class BaseChannelWithProperties : BaseChannelObjectWithProperties
|
||||
{
|
||||
/// <summary>Gets a <see cref="T:System.Collections.IDictionary" /> of the channel properties associated with the current channel object.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IDictionary" /> of the channel properties associated with the current channel object.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x170006F1 RID: 1777
|
||||
// (get) Token: 0x06002552 RID: 9554 RVA: 0x0007B7B8 File Offset: 0x000799B8
|
||||
public override IDictionary Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.SinksWithProperties == null || this.SinksWithProperties.Properties == null)
|
||||
{
|
||||
return base.Properties;
|
||||
}
|
||||
IDictionary[] array = new IDictionary[]
|
||||
{
|
||||
base.Properties,
|
||||
this.SinksWithProperties.Properties
|
||||
};
|
||||
return new AggregateDictionary(array);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Indicates the top channel sink in the channel sink stack.</summary>
|
||||
// Token: 0x04000EA5 RID: 3749
|
||||
protected IChannelSinkBase SinksWithProperties;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x0200039D RID: 925
|
||||
internal class CADSerializer
|
||||
{
|
||||
// Token: 0x06002596 RID: 9622 RVA: 0x0007CC64 File Offset: 0x0007AE64
|
||||
internal static IMessage DeserializeMessage(MemoryStream mem, IMethodCallMessage msg)
|
||||
{
|
||||
BinaryFormatter binaryFormatter = new BinaryFormatter();
|
||||
binaryFormatter.SurrogateSelector = null;
|
||||
mem.Position = 0L;
|
||||
if (msg == null)
|
||||
{
|
||||
return (IMessage)binaryFormatter.Deserialize(mem, null);
|
||||
}
|
||||
return (IMessage)binaryFormatter.DeserializeMethodResponse(mem, null, msg);
|
||||
}
|
||||
|
||||
// Token: 0x06002597 RID: 9623 RVA: 0x0007CCA8 File Offset: 0x0007AEA8
|
||||
internal static MemoryStream SerializeMessage(IMessage msg)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
new BinaryFormatter
|
||||
{
|
||||
SurrogateSelector = new RemotingSurrogateSelector()
|
||||
}.Serialize(memoryStream, msg);
|
||||
memoryStream.Position = 0L;
|
||||
return memoryStream;
|
||||
}
|
||||
|
||||
// Token: 0x06002598 RID: 9624 RVA: 0x0007CCE0 File Offset: 0x0007AEE0
|
||||
internal static MemoryStream SerializeObject(object obj)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
new BinaryFormatter
|
||||
{
|
||||
SurrogateSelector = new RemotingSurrogateSelector()
|
||||
}.Serialize(memoryStream, obj);
|
||||
memoryStream.Position = 0L;
|
||||
return memoryStream;
|
||||
}
|
||||
|
||||
// Token: 0x06002599 RID: 9625 RVA: 0x0007CD18 File Offset: 0x0007AF18
|
||||
internal static object DeserializeObject(MemoryStream mem)
|
||||
{
|
||||
BinaryFormatter binaryFormatter = new BinaryFormatter();
|
||||
binaryFormatter.SurrogateSelector = null;
|
||||
mem.Position = 0L;
|
||||
return binaryFormatter.Deserialize(mem);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x02000397 RID: 919
|
||||
internal class ChanelSinkStackEntry
|
||||
{
|
||||
// Token: 0x06002576 RID: 9590 RVA: 0x0007C724 File Offset: 0x0007A924
|
||||
public ChanelSinkStackEntry(IChannelSinkBase sink, object state, ChanelSinkStackEntry next)
|
||||
{
|
||||
this.Sink = sink;
|
||||
this.State = state;
|
||||
this.Next = next;
|
||||
}
|
||||
|
||||
// Token: 0x04000EB0 RID: 3760
|
||||
public IChannelSinkBase Sink;
|
||||
|
||||
// Token: 0x04000EB1 RID: 3761
|
||||
public object State;
|
||||
|
||||
// Token: 0x04000EB2 RID: 3762
|
||||
public ChanelSinkStackEntry Next;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Stores channel data for the remoting channels.</summary>
|
||||
// Token: 0x02000393 RID: 915
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class ChannelDataStore : IChannelDataStore
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Channels.ChannelDataStore" /> class with the URIs that the current channel maps to.</summary>
|
||||
/// <param name="channelURIs">An array of channel URIs that the current channel maps to. </param>
|
||||
// Token: 0x06002553 RID: 9555 RVA: 0x0007B80C File Offset: 0x00079A0C
|
||||
public ChannelDataStore(string[] channelURIs)
|
||||
{
|
||||
this._channelURIs = channelURIs;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets an array of channel URIs that the current channel maps to.</summary>
|
||||
/// <returns>An array of channel URIs that the current channel maps to.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006F2 RID: 1778
|
||||
// (get) Token: 0x06002554 RID: 9556 RVA: 0x0007B81C File Offset: 0x00079A1C
|
||||
// (set) Token: 0x06002555 RID: 9557 RVA: 0x0007B824 File Offset: 0x00079A24
|
||||
public string[] ChannelUris
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._channelURIs;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._channelURIs = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the data object that is associated with the specified key for the implementing channel.</summary>
|
||||
/// <returns>The specified data object for the implementing channel.</returns>
|
||||
/// <param name="key">The key that the data object is associated with. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x170006F3 RID: 1779
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._extraData == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
foreach (DictionaryEntry dictionaryEntry in this._extraData)
|
||||
{
|
||||
if (dictionaryEntry.Key.Equals(key))
|
||||
{
|
||||
return dictionaryEntry.Value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this._extraData == null)
|
||||
{
|
||||
this._extraData = new DictionaryEntry[]
|
||||
{
|
||||
new DictionaryEntry(key, value)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
DictionaryEntry[] array = new DictionaryEntry[this._extraData.Length + 1];
|
||||
this._extraData.CopyTo(array, 0);
|
||||
array[this._extraData.Length] = new DictionaryEntry(key, value);
|
||||
this._extraData = array;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EA6 RID: 3750
|
||||
private string[] _channelURIs;
|
||||
|
||||
// Token: 0x04000EA7 RID: 3751
|
||||
private DictionaryEntry[] _extraData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,599 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides static methods to aid with remoting channel registration, resolution, and URL discovery. This class cannot be inherited.</summary>
|
||||
// Token: 0x02000395 RID: 917
|
||||
[ComVisible(true)]
|
||||
public sealed class ChannelServices
|
||||
{
|
||||
// Token: 0x0600255C RID: 9564 RVA: 0x0007B94C File Offset: 0x00079B4C
|
||||
private ChannelServices()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x170006F5 RID: 1781
|
||||
// (get) Token: 0x0600255E RID: 9566 RVA: 0x0007B9A4 File Offset: 0x00079BA4
|
||||
internal static CrossContextChannel CrossContextChannel
|
||||
{
|
||||
get
|
||||
{
|
||||
return ChannelServices._crossContextSink;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600255F RID: 9567 RVA: 0x0007B9AC File Offset: 0x00079BAC
|
||||
internal static IMessageSink CreateClientChannelSinkChain(string url, object remoteChannelData, out string objectUri)
|
||||
{
|
||||
object[] array = (object[])remoteChannelData;
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
foreach (object obj in ChannelServices.registeredChannels)
|
||||
{
|
||||
IChannel channel = (IChannel)obj;
|
||||
IChannelSender channelSender = channel as IChannelSender;
|
||||
if (channelSender != null)
|
||||
{
|
||||
IMessageSink messageSink = ChannelServices.CreateClientChannelSinkChain(channelSender, url, array, out objectUri);
|
||||
if (messageSink != null)
|
||||
{
|
||||
return messageSink;
|
||||
}
|
||||
}
|
||||
}
|
||||
RemotingConfiguration.LoadDefaultDelayedChannels();
|
||||
foreach (object obj2 in ChannelServices.delayedClientChannels)
|
||||
{
|
||||
IChannelSender channelSender2 = (IChannelSender)obj2;
|
||||
IMessageSink messageSink2 = ChannelServices.CreateClientChannelSinkChain(channelSender2, url, array, out objectUri);
|
||||
if (messageSink2 != null)
|
||||
{
|
||||
ChannelServices.delayedClientChannels.Remove(channelSender2);
|
||||
ChannelServices.RegisterChannel(channelSender2);
|
||||
return messageSink2;
|
||||
}
|
||||
}
|
||||
}
|
||||
objectUri = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x06002560 RID: 9568 RVA: 0x0007BB1C File Offset: 0x00079D1C
|
||||
internal static IMessageSink CreateClientChannelSinkChain(IChannelSender sender, string url, object[] channelDataArray, out string objectUri)
|
||||
{
|
||||
objectUri = null;
|
||||
if (channelDataArray == null)
|
||||
{
|
||||
return sender.CreateMessageSink(url, null, out objectUri);
|
||||
}
|
||||
foreach (object obj in channelDataArray)
|
||||
{
|
||||
IMessageSink messageSink;
|
||||
if (obj is IChannelDataStore)
|
||||
{
|
||||
messageSink = sender.CreateMessageSink(null, obj, out objectUri);
|
||||
}
|
||||
else
|
||||
{
|
||||
messageSink = sender.CreateMessageSink(url, obj, out objectUri);
|
||||
}
|
||||
if (messageSink != null)
|
||||
{
|
||||
return messageSink;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Gets a list of currently registered channels.</summary>
|
||||
/// <returns>An array of all the currently registered channels.</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: 0x170006F6 RID: 1782
|
||||
// (get) Token: 0x06002561 RID: 9569 RVA: 0x0007BB84 File Offset: 0x00079D84
|
||||
public static IChannel[] RegisteredChannels
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
IChannel[] array;
|
||||
lock (syncRoot)
|
||||
{
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (int i = 0; i < ChannelServices.registeredChannels.Count; i++)
|
||||
{
|
||||
IChannel channel = (IChannel)ChannelServices.registeredChannels[i];
|
||||
if (!(channel is CrossAppDomainChannel))
|
||||
{
|
||||
arrayList.Add(channel);
|
||||
}
|
||||
}
|
||||
array = (IChannel[])arrayList.ToArray(typeof(IChannel));
|
||||
}
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a channel sink chain for the specified channel.</summary>
|
||||
/// <returns>A new channel sink chain for the specified channel.</returns>
|
||||
/// <param name="provider">The first provider in the chain of sink providers that will create the channel sink chain. </param>
|
||||
/// <param name="channel">The <see cref="T:System.Runtime.Remoting.Channels.IChannelReceiver" /> for which to create the channel sink chain. </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: 0x06002562 RID: 9570 RVA: 0x0007BC34 File Offset: 0x00079E34
|
||||
public static IServerChannelSink CreateServerChannelSinkChain(IServerChannelSinkProvider provider, IChannelReceiver channel)
|
||||
{
|
||||
IServerChannelSinkProvider serverChannelSinkProvider = provider;
|
||||
while (serverChannelSinkProvider.Next != null)
|
||||
{
|
||||
serverChannelSinkProvider = serverChannelSinkProvider.Next;
|
||||
}
|
||||
serverChannelSinkProvider.Next = new ServerDispatchSinkProvider();
|
||||
return provider.CreateSink(channel);
|
||||
}
|
||||
|
||||
/// <summary>Dispatches incoming remote calls.</summary>
|
||||
/// <returns>A <see cref="T:System.Runtime.Remoting.Channels.ServerProcessing" /> that gives the status of the server message processing.</returns>
|
||||
/// <param name="sinkStack">The stack of server channel sinks that the message already traversed. </param>
|
||||
/// <param name="msg">The message to dispatch. </param>
|
||||
/// <param name="replyMsg">When this method returns, contains a <see cref="T:System.Runtime.Remoting.Messaging.IMessage" /> that holds the reply from the server to the message that is contained in the <paramref name="msg" /> parameter. This parameter is passed uninitialized. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="msg" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002563 RID: 9571 RVA: 0x0007BC6C File Offset: 0x00079E6C
|
||||
public static ServerProcessing DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, out IMessage replyMsg)
|
||||
{
|
||||
if (msg == null)
|
||||
{
|
||||
throw new ArgumentNullException("msg");
|
||||
}
|
||||
replyMsg = ChannelServices.SyncDispatchMessage(msg);
|
||||
if (RemotingServices.IsOneWay(((IMethodMessage)msg).MethodBase))
|
||||
{
|
||||
return ServerProcessing.OneWay;
|
||||
}
|
||||
return ServerProcessing.Complete;
|
||||
}
|
||||
|
||||
/// <summary>Returns a registered channel with the specified name.</summary>
|
||||
/// <returns>An interface to a registered channel, or null if the channel is not registered.</returns>
|
||||
/// <param name="name">The channel name. </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: 0x06002564 RID: 9572 RVA: 0x0007BCA0 File Offset: 0x00079EA0
|
||||
public static IChannel GetChannel(string name)
|
||||
{
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
IChannel channel2;
|
||||
lock (syncRoot)
|
||||
{
|
||||
foreach (object obj in ChannelServices.registeredChannels)
|
||||
{
|
||||
IChannel channel = (IChannel)obj;
|
||||
if (channel.ChannelName == name && !(channel is CrossAppDomainChannel))
|
||||
{
|
||||
return channel;
|
||||
}
|
||||
}
|
||||
channel2 = null;
|
||||
}
|
||||
return channel2;
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.IDictionary" /> of properties for a given proxy.</summary>
|
||||
/// <returns>An interface to the dictionary of properties, or null if no properties were found.</returns>
|
||||
/// <param name="obj">The proxy to retrieve properties for. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers that is higher in the callstack does not have permission to configure remoting types and channels. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002565 RID: 9573 RVA: 0x0007BD6C File Offset: 0x00079F6C
|
||||
public static IDictionary GetChannelSinkProperties(object obj)
|
||||
{
|
||||
if (!RemotingServices.IsTransparentProxy(obj))
|
||||
{
|
||||
throw new ArgumentException("obj must be a proxy", "obj");
|
||||
}
|
||||
ClientIdentity clientIdentity = (ClientIdentity)RemotingServices.GetRealProxy(obj).ObjectIdentity;
|
||||
IMessageSink messageSink = clientIdentity.ChannelSink;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
while (messageSink != null && !(messageSink is IClientChannelSink))
|
||||
{
|
||||
messageSink = messageSink.NextSink;
|
||||
}
|
||||
if (messageSink == null)
|
||||
{
|
||||
return new Hashtable();
|
||||
}
|
||||
for (IClientChannelSink clientChannelSink = messageSink as IClientChannelSink; clientChannelSink != null; clientChannelSink = clientChannelSink.NextChannelSink)
|
||||
{
|
||||
arrayList.Add(clientChannelSink.Properties);
|
||||
}
|
||||
IDictionary[] array = (IDictionary[])arrayList.ToArray(typeof(IDictionary[]));
|
||||
return new AggregateDictionary(array);
|
||||
}
|
||||
|
||||
/// <summary>Returns an array of all the URLs that can be used to reach the specified object.</summary>
|
||||
/// <returns>An array of strings that contains the URLs that can be used to remotely identify the object, or null if none were found.</returns>
|
||||
/// <param name="obj">The object to retrieve the URL array for. </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: 0x06002566 RID: 9574 RVA: 0x0007BE20 File Offset: 0x0007A020
|
||||
public static string[] GetUrlsForObject(MarshalByRefObject obj)
|
||||
{
|
||||
string objectUri = RemotingServices.GetObjectUri(obj);
|
||||
if (objectUri == null)
|
||||
{
|
||||
return new string[0];
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
foreach (object obj2 in ChannelServices.registeredChannels)
|
||||
{
|
||||
if (!(obj2 is CrossAppDomainChannel))
|
||||
{
|
||||
IChannelReceiver channelReceiver = obj2 as IChannelReceiver;
|
||||
if (channelReceiver != null)
|
||||
{
|
||||
arrayList.AddRange(channelReceiver.GetUrlsForUri(objectUri));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (string[])arrayList.ToArray(typeof(string));
|
||||
}
|
||||
|
||||
/// <summary>Registers a channel with the channel services. <see cref="M:System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(System.Runtime.Remoting.Channels.IChannel)" /> is obsolete. Please use <see cref="M:System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(System.Runtime.Remoting.Channels.IChannel,System.Boolean)" /> instead.</summary>
|
||||
/// <param name="chnl">The channel to register. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="chnl" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The channel has already been registered. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002567 RID: 9575 RVA: 0x0007BF1C File Offset: 0x0007A11C
|
||||
[Obsolete("Use RegisterChannel(IChannel,Boolean)")]
|
||||
public static void RegisterChannel(IChannel chnl)
|
||||
{
|
||||
ChannelServices.RegisterChannel(chnl, false);
|
||||
}
|
||||
|
||||
/// <summary>Registers a channel with the channel services.</summary>
|
||||
/// <param name="chnl">The channel to register.</param>
|
||||
/// <param name="ensureSecurity">true ensures that security is enabled; otherwise false. Setting the value to false will not nullify the security setting done on the TCP or IPC channel. For details, see Remarks.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="chnl" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The channel has already been registered. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the call stack does not have permission to configure remoting types and channels. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">Not supported in Windows 98 for <see cref="T:System.Runtime.Remoting.Channels.Tcp.TcpServerChannel" /> and on all platforms for <see cref="T:System.Runtime.Remoting.Channels.Http.HttpServerChannel" />. Host the service using Internet Information Services (IIS) if you require a secure HTTP channel.</exception>
|
||||
// Token: 0x06002568 RID: 9576 RVA: 0x0007BF28 File Offset: 0x0007A128
|
||||
public static void RegisterChannel(IChannel chnl, bool ensureSecurity)
|
||||
{
|
||||
if (chnl == null)
|
||||
{
|
||||
throw new ArgumentNullException("chnl");
|
||||
}
|
||||
if (ensureSecurity)
|
||||
{
|
||||
ISecurableChannel securableChannel = chnl as ISecurableChannel;
|
||||
if (securableChannel == null)
|
||||
{
|
||||
throw new RemotingException(string.Format("Channel {0} is not securable while ensureSecurity is specified as true", chnl.ChannelName));
|
||||
}
|
||||
securableChannel.IsSecured = true;
|
||||
}
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
int num = -1;
|
||||
for (int i = 0; i < ChannelServices.registeredChannels.Count; i++)
|
||||
{
|
||||
IChannel channel = (IChannel)ChannelServices.registeredChannels[i];
|
||||
if (channel.ChannelName == chnl.ChannelName && chnl.ChannelName != string.Empty)
|
||||
{
|
||||
throw new RemotingException("Channel " + channel.ChannelName + " already registered");
|
||||
}
|
||||
if (channel.ChannelPriority < chnl.ChannelPriority && num == -1)
|
||||
{
|
||||
num = i;
|
||||
}
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
ChannelServices.registeredChannels.Insert(num, chnl);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChannelServices.registeredChannels.Add(chnl);
|
||||
}
|
||||
IChannelReceiver channelReceiver = chnl as IChannelReceiver;
|
||||
if (channelReceiver != null && ChannelServices.oldStartModeTypes.Contains(chnl.GetType().ToString()))
|
||||
{
|
||||
channelReceiver.StartListening(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002569 RID: 9577 RVA: 0x0007C098 File Offset: 0x0007A298
|
||||
internal static void RegisterChannelConfig(ChannelData channel)
|
||||
{
|
||||
IServerChannelSinkProvider serverChannelSinkProvider = null;
|
||||
IClientChannelSinkProvider clientChannelSinkProvider = null;
|
||||
for (int i = channel.ServerProviders.Count - 1; i >= 0; i--)
|
||||
{
|
||||
ProviderData providerData = channel.ServerProviders[i] as ProviderData;
|
||||
IServerChannelSinkProvider serverChannelSinkProvider2 = (IServerChannelSinkProvider)ChannelServices.CreateProvider(providerData);
|
||||
serverChannelSinkProvider2.Next = serverChannelSinkProvider;
|
||||
serverChannelSinkProvider = serverChannelSinkProvider2;
|
||||
}
|
||||
for (int j = channel.ClientProviders.Count - 1; j >= 0; j--)
|
||||
{
|
||||
ProviderData providerData2 = channel.ClientProviders[j] as ProviderData;
|
||||
IClientChannelSinkProvider clientChannelSinkProvider2 = (IClientChannelSinkProvider)ChannelServices.CreateProvider(providerData2);
|
||||
clientChannelSinkProvider2.Next = clientChannelSinkProvider;
|
||||
clientChannelSinkProvider = clientChannelSinkProvider2;
|
||||
}
|
||||
Type type = Type.GetType(channel.Type);
|
||||
if (type == null)
|
||||
{
|
||||
throw new RemotingException("Type '" + channel.Type + "' not found");
|
||||
}
|
||||
bool flag = typeof(IChannelSender).IsAssignableFrom(type);
|
||||
bool flag2 = typeof(IChannelReceiver).IsAssignableFrom(type);
|
||||
Type[] array;
|
||||
object[] array2;
|
||||
if (flag && flag2)
|
||||
{
|
||||
array = new Type[]
|
||||
{
|
||||
typeof(IDictionary),
|
||||
typeof(IClientChannelSinkProvider),
|
||||
typeof(IServerChannelSinkProvider)
|
||||
};
|
||||
array2 = new object[] { channel.CustomProperties, clientChannelSinkProvider, serverChannelSinkProvider };
|
||||
}
|
||||
else if (flag)
|
||||
{
|
||||
array = new Type[]
|
||||
{
|
||||
typeof(IDictionary),
|
||||
typeof(IClientChannelSinkProvider)
|
||||
};
|
||||
array2 = new object[] { channel.CustomProperties, clientChannelSinkProvider };
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!flag2)
|
||||
{
|
||||
throw new RemotingException(type + " is not a valid channel type");
|
||||
}
|
||||
array = new Type[]
|
||||
{
|
||||
typeof(IDictionary),
|
||||
typeof(IServerChannelSinkProvider)
|
||||
};
|
||||
array2 = new object[] { channel.CustomProperties, serverChannelSinkProvider };
|
||||
}
|
||||
ConstructorInfo constructor = type.GetConstructor(array);
|
||||
if (constructor == null)
|
||||
{
|
||||
throw new RemotingException(type + " does not have a valid constructor");
|
||||
}
|
||||
IChannel channel2;
|
||||
try
|
||||
{
|
||||
channel2 = (IChannel)constructor.Invoke(array2);
|
||||
}
|
||||
catch (TargetInvocationException ex)
|
||||
{
|
||||
throw ex.InnerException;
|
||||
}
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
if (channel.DelayLoadAsClientChannel == "true" && !(channel2 is IChannelReceiver))
|
||||
{
|
||||
ChannelServices.delayedClientChannels.Add(channel2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChannelServices.RegisterChannel(channel2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600256A RID: 9578 RVA: 0x0007C360 File Offset: 0x0007A560
|
||||
private static object CreateProvider(ProviderData prov)
|
||||
{
|
||||
Type type = Type.GetType(prov.Type);
|
||||
if (type == null)
|
||||
{
|
||||
throw new RemotingException("Type '" + prov.Type + "' not found");
|
||||
}
|
||||
object[] array = new object[] { prov.CustomProperties, prov.CustomData };
|
||||
object obj;
|
||||
try
|
||||
{
|
||||
obj = Activator.CreateInstance(type, array);
|
||||
}
|
||||
catch (Exception innerException)
|
||||
{
|
||||
if (innerException is TargetInvocationException)
|
||||
{
|
||||
innerException = ((TargetInvocationException)innerException).InnerException;
|
||||
}
|
||||
throw new RemotingException(string.Concat(new object[] { "An instance of provider '", type, "' could not be created: ", innerException.Message }));
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/// <summary>Synchronously dispatches the incoming message to the server-side chain(s) based on the URI embedded in the message.</summary>
|
||||
/// <returns>A reply message is returned by the call to the server-side chain.</returns>
|
||||
/// <param name="msg">The message to dispatch. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="msg" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600256B RID: 9579 RVA: 0x0007C430 File Offset: 0x0007A630
|
||||
public static IMessage SyncDispatchMessage(IMessage msg)
|
||||
{
|
||||
IMessage message = ChannelServices.CheckIncomingMessage(msg);
|
||||
if (message != null)
|
||||
{
|
||||
return ChannelServices.CheckReturnMessage(msg, message);
|
||||
}
|
||||
message = ChannelServices._crossContextSink.SyncProcessMessage(msg);
|
||||
return ChannelServices.CheckReturnMessage(msg, message);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously dispatches the given message to the server-side chain(s) based on the URI embedded in the message.</summary>
|
||||
/// <returns>A <see cref="T:System.Runtime.Remoting.Messaging.IMessageCtrl" /> object used to control the asynchronously dispatched message.</returns>
|
||||
/// <param name="msg">The message to dispatch. </param>
|
||||
/// <param name="replySink">The sink that will process the return message if it is not null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="msg" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600256C RID: 9580 RVA: 0x0007C468 File Offset: 0x0007A668
|
||||
public static IMessageCtrl AsyncDispatchMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
IMessage message = ChannelServices.CheckIncomingMessage(msg);
|
||||
if (message != null)
|
||||
{
|
||||
replySink.SyncProcessMessage(ChannelServices.CheckReturnMessage(msg, message));
|
||||
return null;
|
||||
}
|
||||
if (RemotingConfiguration.CustomErrorsEnabled(ChannelServices.IsLocalCall(msg)))
|
||||
{
|
||||
replySink = new ExceptionFilterSink(msg, replySink);
|
||||
}
|
||||
return ChannelServices._crossContextSink.AsyncProcessMessage(msg, replySink);
|
||||
}
|
||||
|
||||
// Token: 0x0600256D RID: 9581 RVA: 0x0007C4B8 File Offset: 0x0007A6B8
|
||||
private static ReturnMessage CheckIncomingMessage(IMessage msg)
|
||||
{
|
||||
IMethodMessage methodMessage = (IMethodMessage)msg;
|
||||
ServerIdentity serverIdentity = RemotingServices.GetIdentityForUri(methodMessage.Uri) as ServerIdentity;
|
||||
if (serverIdentity == null)
|
||||
{
|
||||
return new ReturnMessage(new RemotingException("No receiver for uri " + methodMessage.Uri), (IMethodCallMessage)msg);
|
||||
}
|
||||
RemotingServices.SetMessageTargetIdentity(msg, serverIdentity);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x0600256E RID: 9582 RVA: 0x0007C50C File Offset: 0x0007A70C
|
||||
internal static IMessage CheckReturnMessage(IMessage callMsg, IMessage retMsg)
|
||||
{
|
||||
IMethodReturnMessage methodReturnMessage = retMsg as IMethodReturnMessage;
|
||||
if (methodReturnMessage != null && methodReturnMessage.Exception != null && RemotingConfiguration.CustomErrorsEnabled(ChannelServices.IsLocalCall(callMsg)))
|
||||
{
|
||||
Exception ex = new Exception("Server encountered an internal error. For more information, turn off customErrors in the server's .config file.");
|
||||
retMsg = new MethodResponse(ex, (IMethodCallMessage)callMsg);
|
||||
}
|
||||
return retMsg;
|
||||
}
|
||||
|
||||
// Token: 0x0600256F RID: 9583 RVA: 0x0007C55C File Offset: 0x0007A75C
|
||||
private static bool IsLocalCall(IMessage callMsg)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Unregisters a particular channel from the registered channels list.</summary>
|
||||
/// <param name="chnl">The channel to unregister. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="chnl" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The channel is not registered. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002570 RID: 9584 RVA: 0x0007C560 File Offset: 0x0007A760
|
||||
public static void UnregisterChannel(IChannel chnl)
|
||||
{
|
||||
if (chnl == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
for (int i = 0; i < ChannelServices.registeredChannels.Count; i++)
|
||||
{
|
||||
if (ChannelServices.registeredChannels[i] == chnl)
|
||||
{
|
||||
ChannelServices.registeredChannels.RemoveAt(i);
|
||||
IChannelReceiver channelReceiver = chnl as IChannelReceiver;
|
||||
if (channelReceiver != null)
|
||||
{
|
||||
channelReceiver.StopListening(null);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new RemotingException("Channel not registered");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002571 RID: 9585 RVA: 0x0007C610 File Offset: 0x0007A810
|
||||
internal static object[] GetCurrentChannelInfo()
|
||||
{
|
||||
ArrayList arrayList = new ArrayList();
|
||||
object syncRoot = ChannelServices.registeredChannels.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
foreach (object obj in ChannelServices.registeredChannels)
|
||||
{
|
||||
IChannelReceiver channelReceiver = obj as IChannelReceiver;
|
||||
if (channelReceiver != null)
|
||||
{
|
||||
object channelData = channelReceiver.ChannelData;
|
||||
if (channelData != null)
|
||||
{
|
||||
arrayList.Add(channelData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return arrayList.ToArray();
|
||||
}
|
||||
|
||||
// Token: 0x04000EA9 RID: 3753
|
||||
private static ArrayList registeredChannels = new ArrayList();
|
||||
|
||||
// Token: 0x04000EAA RID: 3754
|
||||
private static ArrayList delayedClientChannels = new ArrayList();
|
||||
|
||||
// Token: 0x04000EAB RID: 3755
|
||||
private static CrossContextChannel _crossContextSink = new CrossContextChannel();
|
||||
|
||||
// Token: 0x04000EAC RID: 3756
|
||||
internal static string CrossContextUrl = "__CrossContext";
|
||||
|
||||
// Token: 0x04000EAD RID: 3757
|
||||
private static IList oldStartModeTypes = new string[] { "Novell.Zenworks.Zmd.Public.UnixServerChannel", "Novell.Zenworks.Zmd.Public.UnixChannel" };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Holds the stack of client channel sinks that must be invoked during an asynchronous message response decoding.</summary>
|
||||
// Token: 0x02000398 RID: 920
|
||||
[ComVisible(true)]
|
||||
public class ClientChannelSinkStack : IClientChannelSinkStack, IClientResponseChannelSinkStack
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Channels.ClientChannelSinkStack" /> class with default values.</summary>
|
||||
// Token: 0x06002577 RID: 9591 RVA: 0x0007C744 File Offset: 0x0007A944
|
||||
public ClientChannelSinkStack()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Channels.ClientChannelSinkStack" /> class with the specified reply sink.</summary>
|
||||
/// <param name="replySink">The <see cref="T:System.Runtime.Remoting.Messaging.IMessageSink" /> that the current stack can use to reply to messages. </param>
|
||||
// Token: 0x06002578 RID: 9592 RVA: 0x0007C74C File Offset: 0x0007A94C
|
||||
public ClientChannelSinkStack(IMessageSink replySink)
|
||||
{
|
||||
this._replySink = replySink;
|
||||
}
|
||||
|
||||
/// <summary>Requests asynchronous processing of a method call on the sinks that are in the current sink stack.</summary>
|
||||
/// <param name="headers">The headers that are retrieved from the server response stream. </param>
|
||||
/// <param name="stream">The stream that is returning from the transport sink. </param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002579 RID: 9593 RVA: 0x0007C75C File Offset: 0x0007A95C
|
||||
public void AsyncProcessResponse(ITransportHeaders headers, Stream stream)
|
||||
{
|
||||
if (this._sinkStack == null)
|
||||
{
|
||||
throw new RemotingException("The current sink stack is empty");
|
||||
}
|
||||
ChanelSinkStackEntry sinkStack = this._sinkStack;
|
||||
this._sinkStack = this._sinkStack.Next;
|
||||
((IClientChannelSink)sinkStack.Sink).AsyncProcessResponse(this, sinkStack.State, headers, stream);
|
||||
}
|
||||
|
||||
/// <summary>Dispatches the specified exception on the reply sink.</summary>
|
||||
/// <param name="e">The exception to dispatch to the server. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600257A RID: 9594 RVA: 0x0007C7B0 File Offset: 0x0007A9B0
|
||||
public void DispatchException(Exception e)
|
||||
{
|
||||
this.DispatchReplyMessage(new ReturnMessage(e, null));
|
||||
}
|
||||
|
||||
/// <summary>Dispatches the specified reply message on the reply sink.</summary>
|
||||
/// <param name="msg">The <see cref="T:System.Runtime.Remoting.Messaging.IMessage" /> to dispatch. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600257B RID: 9595 RVA: 0x0007C7C0 File Offset: 0x0007A9C0
|
||||
public void DispatchReplyMessage(IMessage msg)
|
||||
{
|
||||
if (this._replySink != null)
|
||||
{
|
||||
this._replySink.SyncProcessMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Pops the information that is associated with all the sinks from the sink stack up to and including the specified sink.</summary>
|
||||
/// <returns>Information generated on the request side and associated with the specified sink.</returns>
|
||||
/// <param name="sink">The sink to remove and return from the sink stack. </param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty, or the specified sink was never pushed onto the current stack. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600257C RID: 9596 RVA: 0x0007C7DC File Offset: 0x0007A9DC
|
||||
public object Pop(IClientChannelSink sink)
|
||||
{
|
||||
while (this._sinkStack != null)
|
||||
{
|
||||
ChanelSinkStackEntry sinkStack = this._sinkStack;
|
||||
this._sinkStack = this._sinkStack.Next;
|
||||
if (sinkStack.Sink == sink)
|
||||
{
|
||||
return sinkStack.State;
|
||||
}
|
||||
}
|
||||
throw new RemotingException("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
|
||||
}
|
||||
|
||||
/// <summary>Pushes the specified sink and information that is associated with it onto the sink stack.</summary>
|
||||
/// <param name="sink">The sink to push onto the sink stack. </param>
|
||||
/// <param name="state">Information generated on the request side that is needed on the response side. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600257D RID: 9597 RVA: 0x0007C830 File Offset: 0x0007AA30
|
||||
public void Push(IClientChannelSink sink, object state)
|
||||
{
|
||||
this._sinkStack = new ChanelSinkStackEntry(sink, state, this._sinkStack);
|
||||
}
|
||||
|
||||
// Token: 0x04000EB3 RID: 3763
|
||||
private IMessageSink _replySink;
|
||||
|
||||
// Token: 0x04000EB4 RID: 3764
|
||||
private ChanelSinkStackEntry _sinkStack;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x0200039A RID: 922
|
||||
[Serializable]
|
||||
internal class CrossAppDomainChannel : IChannel, IChannelReceiver, IChannelSender
|
||||
{
|
||||
// Token: 0x06002583 RID: 9603 RVA: 0x0007C8A0 File Offset: 0x0007AAA0
|
||||
internal static void RegisterCrossAppDomainChannel()
|
||||
{
|
||||
object obj = CrossAppDomainChannel.s_lock;
|
||||
lock (obj)
|
||||
{
|
||||
CrossAppDomainChannel crossAppDomainChannel = new CrossAppDomainChannel();
|
||||
ChannelServices.RegisterChannel(crossAppDomainChannel);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006FA RID: 1786
|
||||
// (get) Token: 0x06002584 RID: 9604 RVA: 0x0007C8F0 File Offset: 0x0007AAF0
|
||||
public virtual string ChannelName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "MONOCAD";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006FB RID: 1787
|
||||
// (get) Token: 0x06002585 RID: 9605 RVA: 0x0007C8F8 File Offset: 0x0007AAF8
|
||||
public virtual int ChannelPriority
|
||||
{
|
||||
get
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002586 RID: 9606 RVA: 0x0007C8FC File Offset: 0x0007AAFC
|
||||
public string Parse(string url, out string objectURI)
|
||||
{
|
||||
objectURI = url;
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x170006FC RID: 1788
|
||||
// (get) Token: 0x06002587 RID: 9607 RVA: 0x0007C904 File Offset: 0x0007AB04
|
||||
public virtual object ChannelData
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CrossAppDomainData(Thread.GetDomainID());
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002588 RID: 9608 RVA: 0x0007C910 File Offset: 0x0007AB10
|
||||
public virtual string[] GetUrlsForUri(string objectURI)
|
||||
{
|
||||
throw new NotSupportedException("CrossAppdomain channel dont support UrlsForUri");
|
||||
}
|
||||
|
||||
// Token: 0x06002589 RID: 9609 RVA: 0x0007C91C File Offset: 0x0007AB1C
|
||||
public virtual void StartListening(object data)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600258A RID: 9610 RVA: 0x0007C920 File Offset: 0x0007AB20
|
||||
public virtual void StopListening(object data)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600258B RID: 9611 RVA: 0x0007C924 File Offset: 0x0007AB24
|
||||
public virtual IMessageSink CreateMessageSink(string url, object data, out string uri)
|
||||
{
|
||||
uri = null;
|
||||
if (data != null)
|
||||
{
|
||||
CrossAppDomainData crossAppDomainData = data as CrossAppDomainData;
|
||||
if (crossAppDomainData != null && crossAppDomainData.ProcessID == RemotingConfiguration.ProcessId)
|
||||
{
|
||||
return CrossAppDomainSink.GetSink(crossAppDomainData.DomainID);
|
||||
}
|
||||
}
|
||||
if (url != null && url.StartsWith("MONOCAD"))
|
||||
{
|
||||
throw new NotSupportedException("Can't create a named channel via crossappdomain");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x04000EB8 RID: 3768
|
||||
private const string _strName = "MONOCAD";
|
||||
|
||||
// Token: 0x04000EB9 RID: 3769
|
||||
private const string _strBaseURI = "MONOCADURI";
|
||||
|
||||
// Token: 0x04000EBA RID: 3770
|
||||
private static object s_lock = new object();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x02000399 RID: 921
|
||||
[Serializable]
|
||||
internal class CrossAppDomainData
|
||||
{
|
||||
// Token: 0x0600257E RID: 9598 RVA: 0x0007C848 File Offset: 0x0007AA48
|
||||
internal CrossAppDomainData(int domainId)
|
||||
{
|
||||
this._ContextID = 0;
|
||||
this._DomainID = domainId;
|
||||
this._processGuid = RemotingConfiguration.ProcessId;
|
||||
}
|
||||
|
||||
// Token: 0x170006F8 RID: 1784
|
||||
// (get) Token: 0x0600257F RID: 9599 RVA: 0x0007C87C File Offset: 0x0007AA7C
|
||||
internal int DomainID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DomainID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170006F9 RID: 1785
|
||||
// (get) Token: 0x06002580 RID: 9600 RVA: 0x0007C884 File Offset: 0x0007AA84
|
||||
internal string ProcessID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._processGuid;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EB5 RID: 3765
|
||||
private object _ContextID;
|
||||
|
||||
// Token: 0x04000EB6 RID: 3766
|
||||
private int _DomainID;
|
||||
|
||||
// Token: 0x04000EB7 RID: 3767
|
||||
private string _processGuid;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x0200039B RID: 923
|
||||
[MonoTODO("Handle domain unloading?")]
|
||||
internal class CrossAppDomainSink : IMessageSink
|
||||
{
|
||||
// Token: 0x0600258C RID: 9612 RVA: 0x0007C98C File Offset: 0x0007AB8C
|
||||
internal CrossAppDomainSink(int domainID)
|
||||
{
|
||||
this._domainID = domainID;
|
||||
}
|
||||
|
||||
// Token: 0x0600258E RID: 9614 RVA: 0x0007C9C4 File Offset: 0x0007ABC4
|
||||
internal static CrossAppDomainSink GetSink(int domainID)
|
||||
{
|
||||
object syncRoot = CrossAppDomainSink.s_sinks.SyncRoot;
|
||||
CrossAppDomainSink crossAppDomainSink;
|
||||
lock (syncRoot)
|
||||
{
|
||||
if (CrossAppDomainSink.s_sinks.ContainsKey(domainID))
|
||||
{
|
||||
crossAppDomainSink = (CrossAppDomainSink)CrossAppDomainSink.s_sinks[domainID];
|
||||
}
|
||||
else
|
||||
{
|
||||
CrossAppDomainSink crossAppDomainSink2 = new CrossAppDomainSink(domainID);
|
||||
CrossAppDomainSink.s_sinks[domainID] = crossAppDomainSink2;
|
||||
crossAppDomainSink = crossAppDomainSink2;
|
||||
}
|
||||
}
|
||||
return crossAppDomainSink;
|
||||
}
|
||||
|
||||
// Token: 0x170006FD RID: 1789
|
||||
// (get) Token: 0x0600258F RID: 9615 RVA: 0x0007CA5C File Offset: 0x0007AC5C
|
||||
internal int TargetDomainId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._domainID;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002590 RID: 9616 RVA: 0x0007CA64 File Offset: 0x0007AC64
|
||||
private static CrossAppDomainSink.ProcessMessageRes ProcessMessageInDomain(byte[] arrRequest, CADMethodCallMessage cadMsg)
|
||||
{
|
||||
CrossAppDomainSink.ProcessMessageRes processMessageRes = default(CrossAppDomainSink.ProcessMessageRes);
|
||||
try
|
||||
{
|
||||
AppDomain.CurrentDomain.ProcessMessageInDomain(arrRequest, cadMsg, out processMessageRes.arrResponse, out processMessageRes.cadMrm);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
IMessage message = new MethodResponse(ex, new ErrorMessage());
|
||||
processMessageRes.arrResponse = CADSerializer.SerializeMessage(message).GetBuffer();
|
||||
}
|
||||
return processMessageRes;
|
||||
}
|
||||
|
||||
// Token: 0x06002591 RID: 9617 RVA: 0x0007CADC File Offset: 0x0007ACDC
|
||||
public virtual IMessage SyncProcessMessage(IMessage msgRequest)
|
||||
{
|
||||
IMessage message = null;
|
||||
try
|
||||
{
|
||||
byte[] array = null;
|
||||
byte[] array2 = null;
|
||||
CADMethodReturnMessage cadmethodReturnMessage = null;
|
||||
CADMethodCallMessage cadmethodCallMessage = CADMethodCallMessage.Create(msgRequest);
|
||||
if (cadmethodCallMessage == null)
|
||||
{
|
||||
MemoryStream memoryStream = CADSerializer.SerializeMessage(msgRequest);
|
||||
array2 = memoryStream.GetBuffer();
|
||||
}
|
||||
Context currentContext = Thread.CurrentContext;
|
||||
try
|
||||
{
|
||||
CrossAppDomainSink.ProcessMessageRes processMessageRes = (CrossAppDomainSink.ProcessMessageRes)AppDomain.InvokeInDomainByID(this._domainID, CrossAppDomainSink.processMessageMethod, null, new object[] { array2, cadmethodCallMessage });
|
||||
array = processMessageRes.arrResponse;
|
||||
cadmethodReturnMessage = processMessageRes.cadMrm;
|
||||
}
|
||||
finally
|
||||
{
|
||||
AppDomain.InternalSetContext(currentContext);
|
||||
}
|
||||
if (array != null)
|
||||
{
|
||||
MemoryStream memoryStream2 = new MemoryStream(array);
|
||||
message = CADSerializer.DeserializeMessage(memoryStream2, msgRequest as IMethodCallMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
message = new MethodResponse(msgRequest as IMethodCallMessage, cadmethodReturnMessage);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
message = new ReturnMessage(ex, msgRequest as IMethodCallMessage);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06002592 RID: 9618 RVA: 0x0007CBFC File Offset: 0x0007ADFC
|
||||
public virtual IMessageCtrl AsyncProcessMessage(IMessage reqMsg, IMessageSink replySink)
|
||||
{
|
||||
AsyncRequest asyncRequest = new AsyncRequest(reqMsg, replySink);
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(this.SendAsyncMessage), asyncRequest);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x06002593 RID: 9619 RVA: 0x0007CC28 File Offset: 0x0007AE28
|
||||
public void SendAsyncMessage(object data)
|
||||
{
|
||||
AsyncRequest asyncRequest = (AsyncRequest)data;
|
||||
IMessage message = this.SyncProcessMessage(asyncRequest.MsgRequest);
|
||||
asyncRequest.ReplySink.SyncProcessMessage(message);
|
||||
}
|
||||
|
||||
// Token: 0x170006FE RID: 1790
|
||||
// (get) Token: 0x06002594 RID: 9620 RVA: 0x0007CC58 File Offset: 0x0007AE58
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EBB RID: 3771
|
||||
private static Hashtable s_sinks = new Hashtable();
|
||||
|
||||
// Token: 0x04000EBC RID: 3772
|
||||
private static MethodInfo processMessageMethod = typeof(CrossAppDomainSink).GetMethod("ProcessMessageInDomain", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
||||
// Token: 0x04000EBD RID: 3773
|
||||
private int _domainID;
|
||||
|
||||
// Token: 0x0200039C RID: 924
|
||||
private struct ProcessMessageRes
|
||||
{
|
||||
// Token: 0x04000EBE RID: 3774
|
||||
public byte[] arrResponse;
|
||||
|
||||
// Token: 0x04000EBF RID: 3775
|
||||
public CADMethodReturnMessage cadMrm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x02000396 RID: 918
|
||||
internal class ExceptionFilterSink : IMessageSink
|
||||
{
|
||||
// Token: 0x06002572 RID: 9586 RVA: 0x0007C6E0 File Offset: 0x0007A8E0
|
||||
public ExceptionFilterSink(IMessage call, IMessageSink next)
|
||||
{
|
||||
this._call = call;
|
||||
this._next = next;
|
||||
}
|
||||
|
||||
// Token: 0x06002573 RID: 9587 RVA: 0x0007C6F8 File Offset: 0x0007A8F8
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
return this._next.SyncProcessMessage(ChannelServices.CheckReturnMessage(this._call, msg));
|
||||
}
|
||||
|
||||
// Token: 0x06002574 RID: 9588 RVA: 0x0007C714 File Offset: 0x0007A914
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x170006F7 RID: 1783
|
||||
// (get) Token: 0x06002575 RID: 9589 RVA: 0x0007C71C File Offset: 0x0007A91C
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EAE RID: 3758
|
||||
private IMessageSink _next;
|
||||
|
||||
// Token: 0x04000EAF RID: 3759
|
||||
private IMessage _call;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides conduits for messages that cross remoting boundaries.</summary>
|
||||
// Token: 0x0200039F RID: 927
|
||||
[ComVisible(true)]
|
||||
public interface IChannel
|
||||
{
|
||||
/// <summary>Gets the name of the channel.</summary>
|
||||
/// <returns>The name of the channel.</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: 0x170006FF RID: 1791
|
||||
// (get) Token: 0x0600259B RID: 9627
|
||||
string ChannelName { get; }
|
||||
|
||||
/// <summary>Gets the priority of the channel.</summary>
|
||||
/// <returns>An integer that indicates the priority of the channel.</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: 0x17000700 RID: 1792
|
||||
// (get) Token: 0x0600259C RID: 9628
|
||||
int ChannelPriority { get; }
|
||||
|
||||
/// <summary>Returns the object URI as an out parameter, and the URI of the current channel as the return value.</summary>
|
||||
/// <returns>The URI of the current channel, or null if the URI does not belong to this channel.</returns>
|
||||
/// <param name="url">The URL of the object. </param>
|
||||
/// <param name="objectURI">When this method returns, contains a <see cref="T:System.String" /> that holds the object URI. This parameter is passed uninitialized. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x0600259D RID: 9629
|
||||
string Parse(string url, out string objectURI);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Stores channel data for the remoting channels.</summary>
|
||||
// Token: 0x020003A0 RID: 928
|
||||
[ComVisible(true)]
|
||||
public interface IChannelDataStore
|
||||
{
|
||||
/// <summary>Gets an array of channel URIs to which the current channel maps.</summary>
|
||||
/// <returns>An array of channel URIs to which the current channel maps.</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: 0x17000701 RID: 1793
|
||||
// (get) Token: 0x0600259E RID: 9630
|
||||
string[] ChannelUris { get; }
|
||||
|
||||
/// <summary>Gets or sets the data object associated with the specified key for the implementing channel.</summary>
|
||||
/// <returns>The specified data object for the implementing channel.</returns>
|
||||
/// <param name="key">The key the data object is associated with. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x17000702 RID: 1794
|
||||
object this[object key] { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides required functions and properties for the receiver channels.</summary>
|
||||
// Token: 0x020003A1 RID: 929
|
||||
[ComVisible(true)]
|
||||
public interface IChannelReceiver : IChannel
|
||||
{
|
||||
/// <summary>Gets the channel-specific data.</summary>
|
||||
/// <returns>The channel data.</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: 0x17000703 RID: 1795
|
||||
// (get) Token: 0x060025A1 RID: 9633
|
||||
object ChannelData { get; }
|
||||
|
||||
/// <summary>Returns an array of all the URLs for a URI.</summary>
|
||||
/// <returns>An array of the URLs.</returns>
|
||||
/// <param name="objectURI">The URI for which URLs are required. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025A2 RID: 9634
|
||||
string[] GetUrlsForUri(string objectURI);
|
||||
|
||||
/// <summary>Instructs the current channel to start listening for requests.</summary>
|
||||
/// <param name="data">Optional initialization information. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025A3 RID: 9635
|
||||
void StartListening(object data);
|
||||
|
||||
/// <summary>Instructs the current channel to stop listening for requests.</summary>
|
||||
/// <param name="data">Optional state information for the channel. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025A4 RID: 9636
|
||||
void StopListening(object data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Indicates that the implementing channel wants to hook into the outside listener service.</summary>
|
||||
// Token: 0x020003A2 RID: 930
|
||||
[ComVisible(true)]
|
||||
public interface IChannelReceiverHook
|
||||
{
|
||||
/// <summary>Gets the type of listener to hook into.</summary>
|
||||
/// <returns>The type of listener to hook into (for example, "http").</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: 0x17000704 RID: 1796
|
||||
// (get) Token: 0x060025A5 RID: 9637
|
||||
string ChannelScheme { get; }
|
||||
|
||||
/// <summary>Gets the channel sink chain that the current channel is using.</summary>
|
||||
/// <returns>The channel sink chain that the current channel is using.</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: 0x17000705 RID: 1797
|
||||
// (get) Token: 0x060025A6 RID: 9638
|
||||
IServerChannelSink ChannelSinkChain { get; }
|
||||
|
||||
/// <summary>Gets a Boolean value that indicates whether <see cref="T:System.Runtime.Remoting.Channels.IChannelReceiverHook" /> needs to be hooked into the outside listener service.</summary>
|
||||
/// <returns>A Boolean value that indicates whether <see cref="T:System.Runtime.Remoting.Channels.IChannelReceiverHook" /> needs to be hooked into the outside listener service.</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: 0x17000706 RID: 1798
|
||||
// (get) Token: 0x060025A7 RID: 9639
|
||||
bool WantsToListen { get; }
|
||||
|
||||
/// <summary>Adds a URI on which the channel hook will listen.</summary>
|
||||
/// <param name="channelUri">A URI on which the channel hook will listen. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025A8 RID: 9640
|
||||
void AddHookChannelUri(string channelUri);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides required functions and properties for the sender channels.</summary>
|
||||
// Token: 0x020003A3 RID: 931
|
||||
[ComVisible(true)]
|
||||
public interface IChannelSender : IChannel
|
||||
{
|
||||
/// <summary>Returns a channel message sink that delivers messages to the specified URL or channel data object.</summary>
|
||||
/// <returns>A channel message sink that delivers messages to the specified URL or channel data object, or null if the channel cannot connect to the given endpoint.</returns>
|
||||
/// <param name="url">The URL to which the new sink will deliver messages. Can be null. </param>
|
||||
/// <param name="remoteChannelData">The channel data object of the remote host to which the new sink will deliver messages. Can be null. </param>
|
||||
/// <param name="objectURI">When this method returns, contains a URI of the new channel message sink that delivers messages to the specified URL or channel data object. This parameter is passed uninitialized. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025A9 RID: 9641
|
||||
IMessageSink CreateMessageSink(string url, object remoteChannelData, out string objectURI);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides the base interface for channel sinks.</summary>
|
||||
// Token: 0x020003A4 RID: 932
|
||||
[ComVisible(true)]
|
||||
public interface IChannelSinkBase
|
||||
{
|
||||
/// <summary>Gets a dictionary through which properties on the sink can be accessed.</summary>
|
||||
/// <returns>A dictionary through which properties on the sink can be accessed, or null if the channel sink does not support properties.</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: 0x17000707 RID: 1799
|
||||
// (get) Token: 0x060025AA RID: 9642
|
||||
IDictionary Properties { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides required functions and properties for client channel sinks.</summary>
|
||||
// Token: 0x020003A5 RID: 933
|
||||
[ComVisible(true)]
|
||||
public interface IClientChannelSink : IChannelSinkBase
|
||||
{
|
||||
/// <summary>Gets the next client channel sink in the client sink chain.</summary>
|
||||
/// <returns>The next client channel sink in the client sink 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: 0x17000708 RID: 1800
|
||||
// (get) Token: 0x060025AB RID: 9643
|
||||
IClientChannelSink NextChannelSink { get; }
|
||||
|
||||
/// <summary>Requests asynchronous processing of a method call on the current sink.</summary>
|
||||
/// <param name="sinkStack">A stack of channel sinks that called this sink. </param>
|
||||
/// <param name="msg">The message to process. </param>
|
||||
/// <param name="headers">The headers to add to the outgoing message heading to the server. </param>
|
||||
/// <param name="stream">The stream headed to the transport sink. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025AC RID: 9644
|
||||
void AsyncProcessRequest(IClientChannelSinkStack sinkStack, IMessage msg, ITransportHeaders headers, Stream stream);
|
||||
|
||||
/// <summary>Requests asynchronous processing of a response to a method call on the current sink.</summary>
|
||||
/// <param name="sinkStack">A stack of sinks that called this sink. </param>
|
||||
/// <param name="state">Information generated on the request side that is associated with this sink. </param>
|
||||
/// <param name="headers">The headers retrieved from the server response stream. </param>
|
||||
/// <param name="stream">The stream coming back from the transport sink. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025AD RID: 9645
|
||||
void AsyncProcessResponse(IClientResponseChannelSinkStack sinkStack, object state, ITransportHeaders headers, Stream stream);
|
||||
|
||||
/// <summary>Returns the <see cref="T:System.IO.Stream" /> onto which the provided message is to be serialized.</summary>
|
||||
/// <returns>The <see cref="T:System.IO.Stream" /> onto which the provided message is to be serialized.</returns>
|
||||
/// <param name="msg">The <see cref="T:System.Runtime.Remoting.Messaging.IMethodCallMessage" /> containing details about the method call. </param>
|
||||
/// <param name="headers">The headers to add to the outgoing message heading to the server. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025AE RID: 9646
|
||||
Stream GetRequestStream(IMessage msg, ITransportHeaders headers);
|
||||
|
||||
/// <summary>Requests message processing from the current sink.</summary>
|
||||
/// <param name="msg">The message to process. </param>
|
||||
/// <param name="requestHeaders">The headers to add to the outgoing message heading to the server. </param>
|
||||
/// <param name="requestStream">The stream headed to the transport sink. </param>
|
||||
/// <param name="responseHeaders">When this method returns, contains a <see cref="T:System.Runtime.Remoting.Channels.ITransportHeaders" /> interface that holds the headers that the server returned. This parameter is passed uninitialized. </param>
|
||||
/// <param name="responseStream">When this method returns, contains a <see cref="T:System.IO.Stream" /> coming back from the transport sink. This parameter is passed uninitialized. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025AF RID: 9647
|
||||
void ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, out ITransportHeaders responseHeaders, out Stream responseStream);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Creates client channel sinks for the client channel through which remoting messages flow.</summary>
|
||||
// Token: 0x020003A6 RID: 934
|
||||
[ComVisible(true)]
|
||||
public interface IClientChannelSinkProvider
|
||||
{
|
||||
/// <summary>Gets or sets the next sink provider in the channel sink provider chain.</summary>
|
||||
/// <returns>The next sink provider in the channel sink provider 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: 0x17000709 RID: 1801
|
||||
// (get) Token: 0x060025B0 RID: 9648
|
||||
// (set) Token: 0x060025B1 RID: 9649
|
||||
IClientChannelSinkProvider Next { get; set; }
|
||||
|
||||
/// <summary>Creates a sink chain.</summary>
|
||||
/// <returns>The first sink of the newly formed channel sink chain, or null, which indicates that this provider will not or cannot provide a connection for this endpoint.</returns>
|
||||
/// <param name="channel">Channel for which the current sink chain is being constructed. </param>
|
||||
/// <param name="url">The URL of the object to connect to. This parameter can be null if the connection is based entirely on the information contained in the <paramref name="remoteChannelData" /> parameter. </param>
|
||||
/// <param name="remoteChannelData">A channel data object that describes a channel on the remote server. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025B2 RID: 9650
|
||||
IClientChannelSink CreateSink(IChannelSender channel, string url, object remoteChannelData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides functionality for a stack of client channel sinks that must be invoked during an asynchronous message response decoding.</summary>
|
||||
// Token: 0x020003A7 RID: 935
|
||||
[ComVisible(true)]
|
||||
public interface IClientChannelSinkStack : IClientResponseChannelSinkStack
|
||||
{
|
||||
/// <summary>Pops the information associated with all the sinks from the sink stack up to and including the specified sink.</summary>
|
||||
/// <returns>Information generated on the request side and associated with the specified sink.</returns>
|
||||
/// <param name="sink">The sink to remove and return from the sink stack. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025B3 RID: 9651
|
||||
object Pop(IClientChannelSink sink);
|
||||
|
||||
/// <summary>Pushes the specified sink and information associated with it onto the sink stack.</summary>
|
||||
/// <param name="sink">The sink to push onto the sink stack. </param>
|
||||
/// <param name="state">Information generated on the request side that is needed on the response side. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025B4 RID: 9652
|
||||
void Push(IClientChannelSink sink, object state);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Marks a sink as a client formatter sink that serializes messages into a stream.</summary>
|
||||
// Token: 0x020003A8 RID: 936
|
||||
[ComVisible(true)]
|
||||
public interface IClientFormatterSink : IChannelSinkBase, IClientChannelSink, IMessageSink
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Marks a client channel sink provider as a client formatter sink provider.</summary>
|
||||
// Token: 0x020003A9 RID: 937
|
||||
[ComVisible(true)]
|
||||
public interface IClientFormatterSinkProvider : IClientChannelSinkProvider
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides the stack functionality for a stack of client response channel sinks that must be invoked during an asynchronous message response decoding.</summary>
|
||||
// Token: 0x020003AA RID: 938
|
||||
[ComVisible(true)]
|
||||
public interface IClientResponseChannelSinkStack
|
||||
{
|
||||
/// <summary>Requests asynchronous processing of a method call on the sinks in the current sink stack.</summary>
|
||||
/// <param name="headers">The headers retrieved from the server response stream. </param>
|
||||
/// <param name="stream">The stream coming back from the transport sink. </param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty. </exception>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025B5 RID: 9653
|
||||
void AsyncProcessResponse(ITransportHeaders headers, Stream stream);
|
||||
|
||||
/// <summary>Dispatches the specified exception on the reply sink.</summary>
|
||||
/// <param name="e">The exception to dispatch to the server. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025B6 RID: 9654
|
||||
void DispatchException(Exception e);
|
||||
|
||||
/// <summary>Dispatches the specified reply message on the reply sink.</summary>
|
||||
/// <param name="msg">The <see cref="T:System.Runtime.Remoting.Messaging.IMessage" /> to dispatch. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025B7 RID: 9655
|
||||
void DispatchReplyMessage(IMessage msg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>The <see cref="T:System.Runtime.Remoting.Channels.ISecurableChannel" /> contains one property, <see cref="P:System.Runtime.Remoting.Channels.ISecurableChannel.IsSecured" />, which gets or sets a Boolean value that indicates whether the current channel is secure.</summary>
|
||||
// Token: 0x020003AB RID: 939
|
||||
public interface ISecurableChannel
|
||||
{
|
||||
/// <summary>Gets or sets a Boolean value that indicates whether the current channel is secure.</summary>
|
||||
/// <returns>A Boolean value that indicates whether the current channel is secure.</returns>
|
||||
// Token: 0x1700070A RID: 1802
|
||||
// (get) Token: 0x060025B8 RID: 9656
|
||||
// (set) Token: 0x060025B9 RID: 9657
|
||||
bool IsSecured { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides methods used for security and transport sinks.</summary>
|
||||
// Token: 0x020003AC RID: 940
|
||||
[ComVisible(true)]
|
||||
public interface IServerChannelSink : IChannelSinkBase
|
||||
{
|
||||
/// <summary>Gets the next server channel sink in the server sink chain.</summary>
|
||||
/// <returns>The next server channel sink in the server sink chain.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have the required <see cref="F:System.Security.Permissions.SecurityPermissionFlag.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: 0x1700070B RID: 1803
|
||||
// (get) Token: 0x060025BA RID: 9658
|
||||
IServerChannelSink NextChannelSink { get; }
|
||||
|
||||
/// <summary>Requests processing from the current sink of the response from a method call sent asynchronously.</summary>
|
||||
/// <param name="sinkStack">A stack of sinks leading back to the server transport sink. </param>
|
||||
/// <param name="state">Information generated on the request side that is associated with this sink. </param>
|
||||
/// <param name="msg">The response message. </param>
|
||||
/// <param name="headers">The headers to add to the return message heading to the client. </param>
|
||||
/// <param name="stream">The stream heading back to the transport sink. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025BB RID: 9659
|
||||
void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers, Stream stream);
|
||||
|
||||
/// <summary>Returns the <see cref="T:System.IO.Stream" /> onto which the provided response message is to be serialized.</summary>
|
||||
/// <returns>The <see cref="T:System.IO.Stream" /> onto which the provided response message is to be serialized.</returns>
|
||||
/// <param name="sinkStack">A stack of sinks leading back to the server transport sink. </param>
|
||||
/// <param name="state">The state that has been pushed to the stack by this sink. </param>
|
||||
/// <param name="msg">The response message to serialize. </param>
|
||||
/// <param name="headers">The headers to put in the response stream to the client. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025BC RID: 9660
|
||||
Stream GetResponseStream(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers);
|
||||
|
||||
/// <summary>Requests message processing from the current sink.</summary>
|
||||
/// <returns>A <see cref="T:System.Runtime.Remoting.Channels.ServerProcessing" /> status value that provides information about how message was processed.</returns>
|
||||
/// <param name="sinkStack">A stack of channel sinks that called the current sink. </param>
|
||||
/// <param name="requestMsg">The message that contains the request. </param>
|
||||
/// <param name="requestHeaders">Headers retrieved from the incoming message from the client. </param>
|
||||
/// <param name="requestStream">The stream that needs to be to processed and passed on to the deserialization sink. </param>
|
||||
/// <param name="responseMsg">When this method returns, contains a <see cref="T:System.Runtime.Remoting.Messaging.IMessage" /> that holds the response message. This parameter is passed uninitialized. </param>
|
||||
/// <param name="responseHeaders">When this method returns, contains a <see cref="T:System.Runtime.Remoting.Channels.ITransportHeaders" /> that holds the headers that are to be added to return message heading to the client. This parameter is passed uninitialized. </param>
|
||||
/// <param name="responseStream">When this method returns, contains a <see cref="T:System.IO.Stream" /> that is heading back to the transport sink. This parameter is passed uninitialized. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025BD RID: 9661
|
||||
ServerProcessing ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, out IMessage responseMsg, out ITransportHeaders responseHeaders, out Stream responseStream);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Creates server channel sinks for the server channel through which remoting messages flow.</summary>
|
||||
// Token: 0x020003AD RID: 941
|
||||
[ComVisible(true)]
|
||||
public interface IServerChannelSinkProvider
|
||||
{
|
||||
/// <summary>Gets or sets the next sink provider in the channel sink provider chain.</summary>
|
||||
/// <returns>The next sink provider in the channel sink provider 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: 0x1700070C RID: 1804
|
||||
// (get) Token: 0x060025BE RID: 9662
|
||||
// (set) Token: 0x060025BF RID: 9663
|
||||
IServerChannelSinkProvider Next { get; set; }
|
||||
|
||||
/// <summary>Creates a sink chain.</summary>
|
||||
/// <returns>The first sink of the newly formed channel sink chain, or null, which indicates that this provider will not or cannot provide a connection for this endpoint.</returns>
|
||||
/// <param name="channel">The channel for which to create the channel sink chain. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025C0 RID: 9664
|
||||
IServerChannelSink CreateSink(IChannelReceiver channel);
|
||||
|
||||
/// <summary>Returns the channel data for the channel that the current sink is associated with.</summary>
|
||||
/// <param name="channelData">A <see cref="T:System.Runtime.Remoting.Channels.IChannelDataStore" /> object in which the channel data is to be returned. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025C1 RID: 9665
|
||||
void GetChannelData(IChannelDataStore channelData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides the stack functionality for a stack of server channel sinks.</summary>
|
||||
// Token: 0x020003AE RID: 942
|
||||
[ComVisible(true)]
|
||||
public interface IServerChannelSinkStack : IServerResponseChannelSinkStack
|
||||
{
|
||||
/// <summary>Pops the information associated with all the sinks from the sink stack up to and including the specified sink.</summary>
|
||||
/// <returns>Information generated on the request side and associated with the specified sink.</returns>
|
||||
/// <param name="sink">The sink to remove and return from the sink stack. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025C2 RID: 9666
|
||||
object Pop(IServerChannelSink sink);
|
||||
|
||||
/// <summary>Pushes the specified sink and information associated with it onto the sink stack.</summary>
|
||||
/// <param name="sink">The sink to push onto the sink stack. </param>
|
||||
/// <param name="state">Information generated on the request side that is needed on the response side. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025C3 RID: 9667
|
||||
void Push(IServerChannelSink sink, object state);
|
||||
|
||||
/// <summary>Presents a callback delegate to handle a callback after a message has been dispatched asynchronously. </summary>
|
||||
/// <param name="ar">The status and state of an asynchronous operation on a remote object.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025C4 RID: 9668
|
||||
void ServerCallback(IAsyncResult ar);
|
||||
|
||||
/// <summary>Stores a message sink and its associated state for later asynchronous processing. </summary>
|
||||
/// <param name="sink">A server channel sink.</param>
|
||||
/// <param name="state">The state associated with <paramref name="sink" />.</param>
|
||||
// Token: 0x060025C5 RID: 9669
|
||||
void Store(IServerChannelSink sink, object state);
|
||||
|
||||
/// <summary>Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. </summary>
|
||||
/// <param name="sink">A server channel sink.</param>
|
||||
/// <param name="state">The state associated with <paramref name="sink" />.</param>
|
||||
// Token: 0x060025C6 RID: 9670
|
||||
void StoreAndDispatch(IServerChannelSink sink, object state);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Marks a server channel sink provider as a server formatter sink provider.</summary>
|
||||
// Token: 0x020003AF RID: 943
|
||||
[ComVisible(true)]
|
||||
public interface IServerFormatterSinkProvider : IServerChannelSinkProvider
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Provides the stack functionality for a stack of server response channel sinks.</summary>
|
||||
// Token: 0x020003B0 RID: 944
|
||||
[ComVisible(true)]
|
||||
public interface IServerResponseChannelSinkStack
|
||||
{
|
||||
/// <summary>Requests asynchronous processing of a method call on the sinks in the current sink stack.</summary>
|
||||
/// <param name="msg">The response message.</param>
|
||||
/// <param name="headers">The headers retrieved from the server response stream.</param>
|
||||
/// <param name="stream">The stream coming back from the transport sink.</param>
|
||||
// Token: 0x060025C7 RID: 9671
|
||||
void AsyncProcessResponse(IMessage msg, ITransportHeaders headers, Stream stream);
|
||||
|
||||
/// <summary>Returns the <see cref="T:System.IO.Stream" /> onto which the specified message is to be serialized.</summary>
|
||||
/// <returns>The <see cref="T:System.IO.Stream" /> onto which the specified message is to be serialized.</returns>
|
||||
/// <param name="msg">The message to be serialized onto the requested stream. </param>
|
||||
/// <param name="headers">The headers retrieved from the server response stream. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x060025C8 RID: 9672
|
||||
Stream GetResponseStream(IMessage msg, ITransportHeaders headers);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Stores a collection of headers used in the channel sinks.</summary>
|
||||
// Token: 0x020003B1 RID: 945
|
||||
[ComVisible(true)]
|
||||
public interface ITransportHeaders
|
||||
{
|
||||
/// <summary>Gets or sets a transport header associated with the given key.</summary>
|
||||
/// <returns>A transport header associated with the given key.</returns>
|
||||
/// <param name="key">The key the requested transport header is associated with. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
||||
// Token: 0x1700070D RID: 1805
|
||||
object this[object key] { get; set; }
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.IEnumerator" /> that iterates over all entries in the <see cref="T:System.Runtime.Remoting.Channels.ITransportHeaders" /> object.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IEnumerator" /> that iterates over all entries in the <see cref="T:System.Runtime.Remoting.Channels.ITransportHeaders" /> 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: 0x060025CB RID: 9675
|
||||
IEnumerator GetEnumerator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Holds the stack of server channel sinks.</summary>
|
||||
// Token: 0x020003B2 RID: 946
|
||||
[ComVisible(true)]
|
||||
public class ServerChannelSinkStack : IServerChannelSinkStack, IServerResponseChannelSinkStack
|
||||
{
|
||||
/// <summary>Returns the <see cref="T:System.IO.Stream" /> onto which the specified message is to be serialized.</summary>
|
||||
/// <returns>The <see cref="T:System.IO.Stream" /> onto which the specified message is to be serialized.</returns>
|
||||
/// <param name="msg">The message to be serialized onto the requested stream. </param>
|
||||
/// <param name="headers">The headers retrieved from the server response stream. </param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The sink stack is empty. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025CD RID: 9677 RVA: 0x0007CD64 File Offset: 0x0007AF64
|
||||
public Stream GetResponseStream(IMessage msg, ITransportHeaders headers)
|
||||
{
|
||||
if (this._sinkStack == null)
|
||||
{
|
||||
throw new RemotingException("The sink stack is empty");
|
||||
}
|
||||
return ((IServerChannelSink)this._sinkStack.Sink).GetResponseStream(this, this._sinkStack.State, msg, headers);
|
||||
}
|
||||
|
||||
/// <summary>Pops the information associated with all the sinks from the sink stack up to and including the specified sink.</summary>
|
||||
/// <returns>Information generated on the request side and associated with the specified sink.</returns>
|
||||
/// <param name="sink">The sink to remove and return from the sink stack. </param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty, or the specified sink was never pushed onto the current stack. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025CE RID: 9678 RVA: 0x0007CDA0 File Offset: 0x0007AFA0
|
||||
public object Pop(IServerChannelSink sink)
|
||||
{
|
||||
while (this._sinkStack != null)
|
||||
{
|
||||
ChanelSinkStackEntry sinkStack = this._sinkStack;
|
||||
this._sinkStack = this._sinkStack.Next;
|
||||
if (sinkStack.Sink == sink)
|
||||
{
|
||||
return sinkStack.State;
|
||||
}
|
||||
}
|
||||
throw new RemotingException("The current sink stack is empty, or the specified sink was never pushed onto the current stack");
|
||||
}
|
||||
|
||||
/// <summary>Pushes the specified sink and information associated with it onto the sink stack.</summary>
|
||||
/// <param name="sink">The sink to push onto the sink stack. </param>
|
||||
/// <param name="state">Information generated on the request side that is needed on the response side. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025CF RID: 9679 RVA: 0x0007CDF4 File Offset: 0x0007AFF4
|
||||
public void Push(IServerChannelSink sink, object state)
|
||||
{
|
||||
this._sinkStack = new ChanelSinkStackEntry(sink, state, this._sinkStack);
|
||||
}
|
||||
|
||||
/// <summary>Provides a <see cref="T:System.AsyncCallback" /> delegate to handle a callback after a message has been dispatched asynchronously. </summary>
|
||||
/// <param name="ar">The status and state of an asynchronous operation on a remote object.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025D0 RID: 9680 RVA: 0x0007CE0C File Offset: 0x0007B00C
|
||||
[MonoTODO]
|
||||
public void ServerCallback(IAsyncResult ar)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Stores a message sink and its associated state for later asynchronous processing. </summary>
|
||||
/// <param name="sink">A server channel sink.</param>
|
||||
/// <param name="state">The state associated with <paramref name="sink" />.</param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty.-or-The specified sink was never pushed onto the current stack. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025D1 RID: 9681 RVA: 0x0007CE14 File Offset: 0x0007B014
|
||||
[MonoTODO]
|
||||
public void Store(IServerChannelSink sink, object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. </summary>
|
||||
/// <param name="sink">A server channel sink.</param>
|
||||
/// <param name="state">The state associated with <paramref name="sink" />.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025D2 RID: 9682 RVA: 0x0007CE1C File Offset: 0x0007B01C
|
||||
[MonoTODO]
|
||||
public void StoreAndDispatch(IServerChannelSink sink, object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Requests asynchronous processing of a method call on the sinks in the current sink stack.</summary>
|
||||
/// <param name="msg">The message to be serialized onto the requested stream.</param>
|
||||
/// <param name="headers">The headers retrieved from the server response stream. </param>
|
||||
/// <param name="stream">The stream coming back from the transport sink. </param>
|
||||
/// <exception cref="T:System.Runtime.Remoting.RemotingException">The current sink stack is empty. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025D3 RID: 9683 RVA: 0x0007CE24 File Offset: 0x0007B024
|
||||
public void AsyncProcessResponse(IMessage msg, ITransportHeaders headers, Stream stream)
|
||||
{
|
||||
if (this._sinkStack == null)
|
||||
{
|
||||
throw new RemotingException("The current sink stack is empty");
|
||||
}
|
||||
ChanelSinkStackEntry sinkStack = this._sinkStack;
|
||||
this._sinkStack = this._sinkStack.Next;
|
||||
((IServerChannelSink)sinkStack.Sink).AsyncProcessResponse(this, sinkStack.State, msg, headers, stream);
|
||||
}
|
||||
|
||||
// Token: 0x04000EC2 RID: 3778
|
||||
private ChanelSinkStackEntry _sinkStack;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x020003B3 RID: 947
|
||||
internal class ServerDispatchSink : IChannelSinkBase, IServerChannelSink
|
||||
{
|
||||
// Token: 0x1700070E RID: 1806
|
||||
// (get) Token: 0x060025D5 RID: 9685 RVA: 0x0007CE84 File Offset: 0x0007B084
|
||||
public IServerChannelSink NextChannelSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700070F RID: 1807
|
||||
// (get) Token: 0x060025D6 RID: 9686 RVA: 0x0007CE88 File Offset: 0x0007B088
|
||||
public IDictionary Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025D7 RID: 9687 RVA: 0x0007CE8C File Offset: 0x0007B08C
|
||||
public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers, Stream stream)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x060025D8 RID: 9688 RVA: 0x0007CE94 File Offset: 0x0007B094
|
||||
public Stream GetResponseStream(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x060025D9 RID: 9689 RVA: 0x0007CE98 File Offset: 0x0007B098
|
||||
public ServerProcessing ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, out IMessage responseMsg, out ITransportHeaders responseHeaders, out Stream responseStream)
|
||||
{
|
||||
responseHeaders = null;
|
||||
responseStream = null;
|
||||
return ChannelServices.DispatchMessage(sinkStack, requestMsg, out responseMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
// Token: 0x020003B4 RID: 948
|
||||
internal class ServerDispatchSinkProvider : IServerChannelSinkProvider, IServerFormatterSinkProvider
|
||||
{
|
||||
// Token: 0x060025DA RID: 9690 RVA: 0x0007CEAC File Offset: 0x0007B0AC
|
||||
public ServerDispatchSinkProvider()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060025DB RID: 9691 RVA: 0x0007CEB4 File Offset: 0x0007B0B4
|
||||
public ServerDispatchSinkProvider(IDictionary properties, ICollection providerData)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000710 RID: 1808
|
||||
// (get) Token: 0x060025DC RID: 9692 RVA: 0x0007CEBC File Offset: 0x0007B0BC
|
||||
// (set) Token: 0x060025DD RID: 9693 RVA: 0x0007CEC0 File Offset: 0x0007B0C0
|
||||
public IServerChannelSinkProvider Next
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025DE RID: 9694 RVA: 0x0007CEC8 File Offset: 0x0007B0C8
|
||||
public IServerChannelSink CreateSink(IChannelReceiver channel)
|
||||
{
|
||||
return new ServerDispatchSink();
|
||||
}
|
||||
|
||||
// Token: 0x060025DF RID: 9695 RVA: 0x0007CED0 File Offset: 0x0007B0D0
|
||||
public void GetChannelData(IChannelDataStore channelData)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Indicates the status of the server message processing.</summary>
|
||||
// Token: 0x020003B5 RID: 949
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public enum ServerProcessing
|
||||
{
|
||||
/// <summary>The server synchronously processed the message.</summary>
|
||||
// Token: 0x04000EC4 RID: 3780
|
||||
Complete,
|
||||
/// <summary>The message was dispatched and no response can be sent.</summary>
|
||||
// Token: 0x04000EC5 RID: 3781
|
||||
OneWay,
|
||||
/// <summary>The call was dispatched asynchronously, which indicates that the sink must store response data on the stack for later processing.</summary>
|
||||
// Token: 0x04000EC6 RID: 3782
|
||||
Async
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Stores sink provider data for sink providers.</summary>
|
||||
// Token: 0x020003B6 RID: 950
|
||||
[ComVisible(true)]
|
||||
public class SinkProviderData
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Channels.SinkProviderData" /> class.</summary>
|
||||
/// <param name="name">The name of the sink provider that the data in the current <see cref="T:System.Runtime.Remoting.Channels.SinkProviderData" /> object is associated with. </param>
|
||||
// Token: 0x060025E0 RID: 9696 RVA: 0x0007CED4 File Offset: 0x0007B0D4
|
||||
public SinkProviderData(string name)
|
||||
{
|
||||
this.sinkName = name;
|
||||
this.children = new ArrayList();
|
||||
this.properties = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Gets a list of the child <see cref="T:System.Runtime.Remoting.Channels.SinkProviderData" /> nodes.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IList" /> of the child <see cref="T:System.Runtime.Remoting.Channels.SinkProviderData" /> nodes.</returns>
|
||||
// Token: 0x17000711 RID: 1809
|
||||
// (get) Token: 0x060025E1 RID: 9697 RVA: 0x0007CEFC File Offset: 0x0007B0FC
|
||||
public IList Children
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.children;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the sink provider that the data in the current <see cref="T:System.Runtime.Remoting.Channels.SinkProviderData" /> object is associated with.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> with the name of the XML node that the data in the current <see cref="T:System.Runtime.Remoting.Channels.SinkProviderData" /> object is associated with.</returns>
|
||||
// Token: 0x17000712 RID: 1810
|
||||
// (get) Token: 0x060025E2 RID: 9698 RVA: 0x0007CF04 File Offset: 0x0007B104
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sinkName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a dictionary through which properties on the sink provider can be accessed.</summary>
|
||||
/// <returns>A dictionary through which properties on the sink provider can be accessed.</returns>
|
||||
// Token: 0x17000713 RID: 1811
|
||||
// (get) Token: 0x060025E3 RID: 9699 RVA: 0x0007CF0C File Offset: 0x0007B10C
|
||||
public IDictionary Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.properties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EC7 RID: 3783
|
||||
private string sinkName;
|
||||
|
||||
// Token: 0x04000EC8 RID: 3784
|
||||
private ArrayList children;
|
||||
|
||||
// Token: 0x04000EC9 RID: 3785
|
||||
private Hashtable properties;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Channels
|
||||
{
|
||||
/// <summary>Stores a collection of headers used in the channel sinks.</summary>
|
||||
// Token: 0x020003B7 RID: 951
|
||||
[ComVisible(true)]
|
||||
[MonoTODO("Serialization format not compatible with .NET")]
|
||||
[Serializable]
|
||||
public class TransportHeaders : ITransportHeaders
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Channels.TransportHeaders" /> class.</summary>
|
||||
// Token: 0x060025E4 RID: 9700 RVA: 0x0007CF14 File Offset: 0x0007B114
|
||||
public TransportHeaders()
|
||||
{
|
||||
this.hash_table = new Hashtable(CaseInsensitiveHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a transport header that is associated with the given key.</summary>
|
||||
/// <returns>A transport header that is associated with the given key, or null if the key was not found.</returns>
|
||||
/// <param name="key">The <see cref="T:System.String" /> that the requested header is associated with. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000714 RID: 1812
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hash_table[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.hash_table[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator of the stored transport headers.</summary>
|
||||
/// <returns>An enumerator of the stored transport headers.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025E7 RID: 9703 RVA: 0x0007CF54 File Offset: 0x0007B154
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.hash_table.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x04000ECA RID: 3786
|
||||
private Hashtable hash_table;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000450 RID: 1104
|
||||
internal class ClientActivatedIdentity : ServerIdentity
|
||||
{
|
||||
// Token: 0x06002A9C RID: 10908 RVA: 0x0008A1E4 File Offset: 0x000883E4
|
||||
public ClientActivatedIdentity(string objectUri, Type objectType)
|
||||
: base(objectUri, null, objectType)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002A9D RID: 10909 RVA: 0x0008A1F0 File Offset: 0x000883F0
|
||||
public MarshalByRefObject GetServerObject()
|
||||
{
|
||||
return this._serverObject;
|
||||
}
|
||||
|
||||
// Token: 0x06002A9E RID: 10910 RVA: 0x0008A1F8 File Offset: 0x000883F8
|
||||
public MarshalByRefObject GetClientProxy()
|
||||
{
|
||||
return this._targetThis;
|
||||
}
|
||||
|
||||
// Token: 0x06002A9F RID: 10911 RVA: 0x0008A200 File Offset: 0x00088400
|
||||
public void SetClientProxy(MarshalByRefObject obj)
|
||||
{
|
||||
this._targetThis = obj;
|
||||
}
|
||||
|
||||
// Token: 0x06002AA0 RID: 10912 RVA: 0x0008A20C File Offset: 0x0008840C
|
||||
public override void OnLifetimeExpired()
|
||||
{
|
||||
base.OnLifetimeExpired();
|
||||
RemotingServices.DisposeIdentity(this);
|
||||
}
|
||||
|
||||
// Token: 0x06002AA1 RID: 10913 RVA: 0x0008A21C File Offset: 0x0008841C
|
||||
public override IMessage SyncObjectProcessMessage(IMessage msg)
|
||||
{
|
||||
if (this._serverSink == null)
|
||||
{
|
||||
bool flag = this._targetThis != null;
|
||||
this._serverSink = this._context.CreateServerObjectSinkChain((!flag) ? this._serverObject : this._targetThis, flag);
|
||||
}
|
||||
return this._serverSink.SyncProcessMessage(msg);
|
||||
}
|
||||
|
||||
// Token: 0x06002AA2 RID: 10914 RVA: 0x0008A278 File Offset: 0x00088478
|
||||
public override IMessageCtrl AsyncObjectProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
if (this._serverSink == null)
|
||||
{
|
||||
bool flag = this._targetThis != null;
|
||||
this._serverSink = this._context.CreateServerObjectSinkChain((!flag) ? this._serverObject : this._targetThis, flag);
|
||||
}
|
||||
return this._serverSink.AsyncProcessMessage(msg, replySink);
|
||||
}
|
||||
|
||||
// Token: 0x04001050 RID: 4176
|
||||
private MarshalByRefObject _targetThis;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000441 RID: 1089
|
||||
internal class ClientIdentity : Identity
|
||||
{
|
||||
// Token: 0x060029DE RID: 10718 RVA: 0x000865E4 File Offset: 0x000847E4
|
||||
public ClientIdentity(string objectUri, ObjRef objRef)
|
||||
: base(objectUri)
|
||||
{
|
||||
this._objRef = objRef;
|
||||
IMessageSink messageSink;
|
||||
if (this._objRef.EnvoyInfo != null)
|
||||
{
|
||||
IMessageSink envoySinks = this._objRef.EnvoyInfo.EnvoySinks;
|
||||
messageSink = envoySinks;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageSink = null;
|
||||
}
|
||||
this._envoySink = messageSink;
|
||||
}
|
||||
|
||||
// Token: 0x17000853 RID: 2131
|
||||
// (get) Token: 0x060029DF RID: 10719 RVA: 0x00086630 File Offset: 0x00084830
|
||||
// (set) Token: 0x060029E0 RID: 10720 RVA: 0x00086644 File Offset: 0x00084844
|
||||
public MarshalByRefObject ClientProxy
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MarshalByRefObject)this._proxyReference.Target;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._proxyReference = new WeakReference(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060029E1 RID: 10721 RVA: 0x00086654 File Offset: 0x00084854
|
||||
public override ObjRef CreateObjRef(Type requestedType)
|
||||
{
|
||||
return this._objRef;
|
||||
}
|
||||
|
||||
// Token: 0x17000854 RID: 2132
|
||||
// (get) Token: 0x060029E2 RID: 10722 RVA: 0x0008665C File Offset: 0x0008485C
|
||||
public string TargetUri
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._objRef.URI;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04001012 RID: 4114
|
||||
private WeakReference _proxyReference;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,606 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using Mono.Xml;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000446 RID: 1094
|
||||
internal class ConfigHandler : SmallXmlParser.IContentHandler
|
||||
{
|
||||
// Token: 0x06002A27 RID: 10791 RVA: 0x000878D4 File Offset: 0x00085AD4
|
||||
public ConfigHandler(bool onlyDelayedChannels)
|
||||
{
|
||||
this.onlyDelayedChannels = onlyDelayedChannels;
|
||||
}
|
||||
|
||||
// Token: 0x06002A28 RID: 10792 RVA: 0x00087910 File Offset: 0x00085B10
|
||||
private void ValidatePath(string element, params string[] paths)
|
||||
{
|
||||
foreach (string text in paths)
|
||||
{
|
||||
if (this.CheckPath(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new RemotingException("Element " + element + " not allowed in this context");
|
||||
}
|
||||
|
||||
// Token: 0x06002A29 RID: 10793 RVA: 0x0008795C File Offset: 0x00085B5C
|
||||
private bool CheckPath(string path)
|
||||
{
|
||||
CompareInfo compareInfo = CultureInfo.InvariantCulture.CompareInfo;
|
||||
if (compareInfo.IsPrefix(path, "/", CompareOptions.Ordinal))
|
||||
{
|
||||
return path == this.currentXmlPath;
|
||||
}
|
||||
return compareInfo.IsSuffix(this.currentXmlPath, path, CompareOptions.Ordinal);
|
||||
}
|
||||
|
||||
// Token: 0x06002A2A RID: 10794 RVA: 0x000879AC File Offset: 0x00085BAC
|
||||
public void OnStartParsing(SmallXmlParser parser)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002A2B RID: 10795 RVA: 0x000879B0 File Offset: 0x00085BB0
|
||||
public void OnProcessingInstruction(string name, string text)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002A2C RID: 10796 RVA: 0x000879B4 File Offset: 0x00085BB4
|
||||
public void OnIgnorableWhitespace(string s)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002A2D RID: 10797 RVA: 0x000879B8 File Offset: 0x00085BB8
|
||||
public void OnStartElement(string name, SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.currentXmlPath.StartsWith("/configuration/system.runtime.remoting"))
|
||||
{
|
||||
this.ParseElement(name, attrs);
|
||||
}
|
||||
this.currentXmlPath = this.currentXmlPath + "/" + name;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new RemotingException("Error in element " + name + ": " + ex.Message, ex);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002A2E RID: 10798 RVA: 0x00087A40 File Offset: 0x00085C40
|
||||
public void ParseElement(string name, SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
if (this.currentProviderData != null)
|
||||
{
|
||||
this.ReadCustomProviderData(name, attrs);
|
||||
return;
|
||||
}
|
||||
if (name != null)
|
||||
{
|
||||
if (ConfigHandler.<>f__switch$map27 == null)
|
||||
{
|
||||
ConfigHandler.<>f__switch$map27 = new Dictionary<string, int>(19)
|
||||
{
|
||||
{ "application", 0 },
|
||||
{ "lifetime", 1 },
|
||||
{ "channels", 2 },
|
||||
{ "channel", 3 },
|
||||
{ "serverProviders", 4 },
|
||||
{ "clientProviders", 5 },
|
||||
{ "provider", 6 },
|
||||
{ "formatter", 6 },
|
||||
{ "client", 7 },
|
||||
{ "service", 8 },
|
||||
{ "wellknown", 9 },
|
||||
{ "activated", 10 },
|
||||
{ "soapInterop", 11 },
|
||||
{ "interopXmlType", 12 },
|
||||
{ "interopXmlElement", 13 },
|
||||
{ "preLoad", 14 },
|
||||
{ "debug", 15 },
|
||||
{ "channelSinkProviders", 16 },
|
||||
{ "customErrors", 17 }
|
||||
};
|
||||
}
|
||||
int num;
|
||||
if (ConfigHandler.<>f__switch$map27.TryGetValue(name, out num))
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
case 0:
|
||||
this.ValidatePath(name, new string[] { "system.runtime.remoting" });
|
||||
if (attrs.Names.Length > 0)
|
||||
{
|
||||
this.appName = attrs.Values[0];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
this.ValidatePath(name, new string[] { "application" });
|
||||
this.ReadLifetine(attrs);
|
||||
break;
|
||||
case 2:
|
||||
this.ValidatePath(name, new string[] { "system.runtime.remoting", "application" });
|
||||
break;
|
||||
case 3:
|
||||
this.ValidatePath(name, new string[] { "channels" });
|
||||
if (this.currentXmlPath.IndexOf("application") != -1)
|
||||
{
|
||||
this.ReadChannel(attrs, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ReadChannel(attrs, true);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
this.ValidatePath(name, new string[] { "channelSinkProviders", "channel" });
|
||||
break;
|
||||
case 5:
|
||||
this.ValidatePath(name, new string[] { "channelSinkProviders", "channel" });
|
||||
break;
|
||||
case 6:
|
||||
if (this.CheckPath("application/channels/channel/serverProviders") || this.CheckPath("channels/channel/serverProviders"))
|
||||
{
|
||||
ProviderData providerData = this.ReadProvider(name, attrs, false);
|
||||
this.currentChannel.ServerProviders.Add(providerData);
|
||||
}
|
||||
else if (this.CheckPath("application/channels/channel/clientProviders") || this.CheckPath("channels/channel/clientProviders"))
|
||||
{
|
||||
ProviderData providerData = this.ReadProvider(name, attrs, false);
|
||||
this.currentChannel.ClientProviders.Add(providerData);
|
||||
}
|
||||
else if (this.CheckPath("channelSinkProviders/serverProviders"))
|
||||
{
|
||||
ProviderData providerData = this.ReadProvider(name, attrs, true);
|
||||
RemotingConfiguration.RegisterServerProviderTemplate(providerData);
|
||||
}
|
||||
else if (this.CheckPath("channelSinkProviders/clientProviders"))
|
||||
{
|
||||
ProviderData providerData = this.ReadProvider(name, attrs, true);
|
||||
RemotingConfiguration.RegisterClientProviderTemplate(providerData);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ValidatePath(name, new string[0]);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
this.ValidatePath(name, new string[] { "application" });
|
||||
this.currentClientUrl = attrs.GetValue("url");
|
||||
break;
|
||||
case 8:
|
||||
this.ValidatePath(name, new string[] { "application" });
|
||||
break;
|
||||
case 9:
|
||||
this.ValidatePath(name, new string[] { "client", "service" });
|
||||
if (this.CheckPath("client"))
|
||||
{
|
||||
this.ReadClientWellKnown(attrs);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ReadServiceWellKnown(attrs);
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
this.ValidatePath(name, new string[] { "client", "service" });
|
||||
if (this.CheckPath("client"))
|
||||
{
|
||||
this.ReadClientActivated(attrs);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ReadServiceActivated(attrs);
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
this.ValidatePath(name, new string[] { "application" });
|
||||
break;
|
||||
case 12:
|
||||
this.ValidatePath(name, new string[] { "soapInterop" });
|
||||
this.ReadInteropXml(attrs, false);
|
||||
break;
|
||||
case 13:
|
||||
this.ValidatePath(name, new string[] { "soapInterop" });
|
||||
this.ReadInteropXml(attrs, false);
|
||||
break;
|
||||
case 14:
|
||||
this.ValidatePath(name, new string[] { "soapInterop" });
|
||||
this.ReadPreload(attrs);
|
||||
break;
|
||||
case 15:
|
||||
this.ValidatePath(name, new string[] { "system.runtime.remoting" });
|
||||
break;
|
||||
case 16:
|
||||
this.ValidatePath(name, new string[] { "system.runtime.remoting" });
|
||||
break;
|
||||
case 17:
|
||||
this.ValidatePath(name, new string[] { "system.runtime.remoting" });
|
||||
RemotingConfiguration.SetCustomErrorsMode(attrs.GetValue("mode"));
|
||||
break;
|
||||
default:
|
||||
goto IL_512;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
IL_512:
|
||||
throw new RemotingException("Element '" + name + "' is not valid in system.remoting.configuration section");
|
||||
}
|
||||
|
||||
// Token: 0x06002A2F RID: 10799 RVA: 0x00087F78 File Offset: 0x00086178
|
||||
public void OnEndElement(string name)
|
||||
{
|
||||
if (this.currentProviderData != null)
|
||||
{
|
||||
this.currentProviderData.Pop();
|
||||
if (this.currentProviderData.Count == 0)
|
||||
{
|
||||
this.currentProviderData = null;
|
||||
}
|
||||
}
|
||||
this.currentXmlPath = this.currentXmlPath.Substring(0, this.currentXmlPath.Length - name.Length - 1);
|
||||
}
|
||||
|
||||
// Token: 0x06002A30 RID: 10800 RVA: 0x00087FDC File Offset: 0x000861DC
|
||||
private void ReadCustomProviderData(string name, SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
SinkProviderData sinkProviderData = (SinkProviderData)this.currentProviderData.Peek();
|
||||
SinkProviderData sinkProviderData2 = new SinkProviderData(name);
|
||||
for (int i = 0; i < attrs.Names.Length; i++)
|
||||
{
|
||||
sinkProviderData2.Properties[attrs.Names[i]] = attrs.GetValue(i);
|
||||
}
|
||||
sinkProviderData.Children.Add(sinkProviderData2);
|
||||
this.currentProviderData.Push(sinkProviderData2);
|
||||
}
|
||||
|
||||
// Token: 0x06002A31 RID: 10801 RVA: 0x00088050 File Offset: 0x00086250
|
||||
private void ReadLifetine(SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
int i = 0;
|
||||
while (i < attrs.Names.Length)
|
||||
{
|
||||
string text = attrs.Names[i];
|
||||
if (text != null)
|
||||
{
|
||||
if (ConfigHandler.<>f__switch$map28 == null)
|
||||
{
|
||||
ConfigHandler.<>f__switch$map28 = new Dictionary<string, int>(4)
|
||||
{
|
||||
{ "leaseTime", 0 },
|
||||
{ "sponsorshipTimeout", 1 },
|
||||
{ "renewOnCallTime", 2 },
|
||||
{ "leaseManagerPollTime", 3 }
|
||||
};
|
||||
}
|
||||
int num;
|
||||
if (ConfigHandler.<>f__switch$map28.TryGetValue(text, out num))
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
case 0:
|
||||
LifetimeServices.LeaseTime = this.ParseTime(attrs.GetValue(i));
|
||||
break;
|
||||
case 1:
|
||||
LifetimeServices.SponsorshipTimeout = this.ParseTime(attrs.GetValue(i));
|
||||
break;
|
||||
case 2:
|
||||
LifetimeServices.RenewOnCallTime = this.ParseTime(attrs.GetValue(i));
|
||||
break;
|
||||
case 3:
|
||||
LifetimeServices.LeaseManagerPollTime = this.ParseTime(attrs.GetValue(i));
|
||||
break;
|
||||
default:
|
||||
goto IL_E6;
|
||||
}
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
IL_E6:
|
||||
throw new RemotingException("Invalid attribute: " + attrs.Names[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002A32 RID: 10802 RVA: 0x00088170 File Offset: 0x00086370
|
||||
private TimeSpan ParseTime(string s)
|
||||
{
|
||||
if (s == string.Empty || s == null)
|
||||
{
|
||||
throw new RemotingException("Invalid time value");
|
||||
}
|
||||
int num = s.IndexOfAny(new char[] { 'D', 'H', 'M', 'S' });
|
||||
string text;
|
||||
if (num == -1)
|
||||
{
|
||||
text = "S";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = s.Substring(num);
|
||||
s = s.Substring(0, num);
|
||||
}
|
||||
double num2;
|
||||
try
|
||||
{
|
||||
num2 = double.Parse(s);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new RemotingException("Invalid time value: " + s);
|
||||
}
|
||||
if (text == "D")
|
||||
{
|
||||
return TimeSpan.FromDays(num2);
|
||||
}
|
||||
if (text == "H")
|
||||
{
|
||||
return TimeSpan.FromHours(num2);
|
||||
}
|
||||
if (text == "M")
|
||||
{
|
||||
return TimeSpan.FromMinutes(num2);
|
||||
}
|
||||
if (text == "S")
|
||||
{
|
||||
return TimeSpan.FromSeconds(num2);
|
||||
}
|
||||
if (text == "MS")
|
||||
{
|
||||
return TimeSpan.FromMilliseconds(num2);
|
||||
}
|
||||
throw new RemotingException("Invalid time unit: " + text);
|
||||
}
|
||||
|
||||
// Token: 0x06002A33 RID: 10803 RVA: 0x0008829C File Offset: 0x0008649C
|
||||
private void ReadChannel(SmallXmlParser.IAttrList attrs, bool isTemplate)
|
||||
{
|
||||
ChannelData channelData = new ChannelData();
|
||||
for (int i = 0; i < attrs.Names.Length; i++)
|
||||
{
|
||||
string text = attrs.Names[i];
|
||||
string text2 = attrs.Values[i];
|
||||
if (text == "ref" && !isTemplate)
|
||||
{
|
||||
channelData.Ref = text2;
|
||||
}
|
||||
else if (text == "delayLoadAsClientChannel")
|
||||
{
|
||||
channelData.DelayLoadAsClientChannel = text2;
|
||||
}
|
||||
else if (text == "id" && isTemplate)
|
||||
{
|
||||
channelData.Id = text2;
|
||||
}
|
||||
else if (text == "type")
|
||||
{
|
||||
channelData.Type = text2;
|
||||
}
|
||||
else
|
||||
{
|
||||
channelData.CustomProperties.Add(text, text2);
|
||||
}
|
||||
}
|
||||
if (isTemplate)
|
||||
{
|
||||
if (channelData.Id == null)
|
||||
{
|
||||
throw new RemotingException("id attribute is required");
|
||||
}
|
||||
if (channelData.Type == null)
|
||||
{
|
||||
throw new RemotingException("id attribute is required");
|
||||
}
|
||||
RemotingConfiguration.RegisterChannelTemplate(channelData);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.channelInstances.Add(channelData);
|
||||
}
|
||||
this.currentChannel = channelData;
|
||||
}
|
||||
|
||||
// Token: 0x06002A34 RID: 10804 RVA: 0x000883B4 File Offset: 0x000865B4
|
||||
private ProviderData ReadProvider(string name, SmallXmlParser.IAttrList attrs, bool isTemplate)
|
||||
{
|
||||
ProviderData providerData = ((!(name == "provider")) ? new FormatterData() : new ProviderData());
|
||||
SinkProviderData sinkProviderData = new SinkProviderData("root");
|
||||
providerData.CustomData = sinkProviderData.Children;
|
||||
this.currentProviderData = new Stack();
|
||||
this.currentProviderData.Push(sinkProviderData);
|
||||
for (int i = 0; i < attrs.Names.Length; i++)
|
||||
{
|
||||
string text = attrs.Names[i];
|
||||
string text2 = attrs.Values[i];
|
||||
if (text == "id" && isTemplate)
|
||||
{
|
||||
providerData.Id = text2;
|
||||
}
|
||||
else if (text == "type")
|
||||
{
|
||||
providerData.Type = text2;
|
||||
}
|
||||
else if (text == "ref" && !isTemplate)
|
||||
{
|
||||
providerData.Ref = text2;
|
||||
}
|
||||
else
|
||||
{
|
||||
providerData.CustomProperties.Add(text, text2);
|
||||
}
|
||||
}
|
||||
if (providerData.Id == null && isTemplate)
|
||||
{
|
||||
throw new RemotingException("id attribute is required");
|
||||
}
|
||||
return providerData;
|
||||
}
|
||||
|
||||
// Token: 0x06002A35 RID: 10805 RVA: 0x000884CC File Offset: 0x000866CC
|
||||
private void ReadClientActivated(SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
string notNull = this.GetNotNull(attrs, "type");
|
||||
string text = this.ExtractAssembly(ref notNull);
|
||||
if (this.currentClientUrl == null || this.currentClientUrl == string.Empty)
|
||||
{
|
||||
throw new RemotingException("url attribute is required in client element when it contains activated entries");
|
||||
}
|
||||
this.typeEntries.Add(new ActivatedClientTypeEntry(notNull, text, this.currentClientUrl));
|
||||
}
|
||||
|
||||
// Token: 0x06002A36 RID: 10806 RVA: 0x00088534 File Offset: 0x00086734
|
||||
private void ReadServiceActivated(SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
string notNull = this.GetNotNull(attrs, "type");
|
||||
string text = this.ExtractAssembly(ref notNull);
|
||||
this.typeEntries.Add(new ActivatedServiceTypeEntry(notNull, text));
|
||||
}
|
||||
|
||||
// Token: 0x06002A37 RID: 10807 RVA: 0x0008856C File Offset: 0x0008676C
|
||||
private void ReadClientWellKnown(SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
string notNull = this.GetNotNull(attrs, "url");
|
||||
string notNull2 = this.GetNotNull(attrs, "type");
|
||||
string text = this.ExtractAssembly(ref notNull2);
|
||||
this.typeEntries.Add(new WellKnownClientTypeEntry(notNull2, text, notNull));
|
||||
}
|
||||
|
||||
// Token: 0x06002A38 RID: 10808 RVA: 0x000885B0 File Offset: 0x000867B0
|
||||
private void ReadServiceWellKnown(SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
string notNull = this.GetNotNull(attrs, "objectUri");
|
||||
string notNull2 = this.GetNotNull(attrs, "mode");
|
||||
string notNull3 = this.GetNotNull(attrs, "type");
|
||||
string text = this.ExtractAssembly(ref notNull3);
|
||||
WellKnownObjectMode wellKnownObjectMode;
|
||||
if (notNull2 == "SingleCall")
|
||||
{
|
||||
wellKnownObjectMode = WellKnownObjectMode.SingleCall;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(notNull2 == "Singleton"))
|
||||
{
|
||||
throw new RemotingException("wellknown object mode '" + notNull2 + "' is invalid");
|
||||
}
|
||||
wellKnownObjectMode = WellKnownObjectMode.Singleton;
|
||||
}
|
||||
this.typeEntries.Add(new WellKnownServiceTypeEntry(notNull3, text, notNull, wellKnownObjectMode));
|
||||
}
|
||||
|
||||
// Token: 0x06002A39 RID: 10809 RVA: 0x0008864C File Offset: 0x0008684C
|
||||
private void ReadInteropXml(SmallXmlParser.IAttrList attrs, bool isElement)
|
||||
{
|
||||
Type type = Type.GetType(this.GetNotNull(attrs, "clr"));
|
||||
string[] array = this.GetNotNull(attrs, "xml").Split(new char[] { ',' });
|
||||
string text = array[0].Trim();
|
||||
string text2 = ((array.Length <= 0) ? null : array[1].Trim());
|
||||
if (isElement)
|
||||
{
|
||||
SoapServices.RegisterInteropXmlElement(text, text2, type);
|
||||
}
|
||||
else
|
||||
{
|
||||
SoapServices.RegisterInteropXmlType(text, text2, type);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002A3A RID: 10810 RVA: 0x000886C4 File Offset: 0x000868C4
|
||||
private void ReadPreload(SmallXmlParser.IAttrList attrs)
|
||||
{
|
||||
string value = attrs.GetValue("type");
|
||||
string value2 = attrs.GetValue("assembly");
|
||||
if (value != null && value2 != null)
|
||||
{
|
||||
throw new RemotingException("Type and assembly attributes cannot be specified together");
|
||||
}
|
||||
if (value != null)
|
||||
{
|
||||
SoapServices.PreLoad(Type.GetType(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value2 == null)
|
||||
{
|
||||
throw new RemotingException("Either type or assembly attributes must be specified");
|
||||
}
|
||||
SoapServices.PreLoad(Assembly.Load(value2));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002A3B RID: 10811 RVA: 0x00088738 File Offset: 0x00086938
|
||||
private string GetNotNull(SmallXmlParser.IAttrList attrs, string name)
|
||||
{
|
||||
string value = attrs.GetValue(name);
|
||||
if (value == null || value == string.Empty)
|
||||
{
|
||||
throw new RemotingException(name + " attribute is required");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// Token: 0x06002A3C RID: 10812 RVA: 0x00088778 File Offset: 0x00086978
|
||||
private string ExtractAssembly(ref string type)
|
||||
{
|
||||
int num = type.IndexOf(',');
|
||||
if (num == -1)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
string text = type.Substring(num + 1).Trim();
|
||||
type = type.Substring(0, num).Trim();
|
||||
return text;
|
||||
}
|
||||
|
||||
// Token: 0x06002A3D RID: 10813 RVA: 0x000887C0 File Offset: 0x000869C0
|
||||
public void OnChars(string ch)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06002A3E RID: 10814 RVA: 0x000887C4 File Offset: 0x000869C4
|
||||
public void OnEndParsing(SmallXmlParser parser)
|
||||
{
|
||||
RemotingConfiguration.RegisterChannels(this.channelInstances, this.onlyDelayedChannels);
|
||||
if (this.appName != null)
|
||||
{
|
||||
RemotingConfiguration.ApplicationName = this.appName;
|
||||
}
|
||||
if (!this.onlyDelayedChannels)
|
||||
{
|
||||
RemotingConfiguration.RegisterTypes(this.typeEntries);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400102B RID: 4139
|
||||
private ArrayList typeEntries = new ArrayList();
|
||||
|
||||
// Token: 0x0400102C RID: 4140
|
||||
private ArrayList channelInstances = new ArrayList();
|
||||
|
||||
// Token: 0x0400102D RID: 4141
|
||||
private ChannelData currentChannel;
|
||||
|
||||
// Token: 0x0400102E RID: 4142
|
||||
private Stack currentProviderData;
|
||||
|
||||
// Token: 0x0400102F RID: 4143
|
||||
private string currentClientUrl;
|
||||
|
||||
// Token: 0x04001030 RID: 4144
|
||||
private string appName;
|
||||
|
||||
// Token: 0x04001031 RID: 4145
|
||||
private string currentXmlPath = string.Empty;
|
||||
|
||||
// Token: 0x04001032 RID: 4146
|
||||
private bool onlyDelayedChannels;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,600 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Activation;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Runtime.Remoting.Proxies;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Defines an environment for the objects that are resident inside it and for which a policy can be enforced.</summary>
|
||||
// Token: 0x020003B8 RID: 952
|
||||
[ComVisible(true)]
|
||||
public class Context
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Contexts.Context" /> class.</summary>
|
||||
// Token: 0x060025E8 RID: 9704 RVA: 0x0007CF64 File Offset: 0x0007B164
|
||||
public Context()
|
||||
{
|
||||
this.domain_id = Thread.GetDomainID();
|
||||
this.context_id = 1 + Context.global_count++;
|
||||
}
|
||||
|
||||
/// <summary>Cleans up the backing objects for the nondefault contexts.</summary>
|
||||
// Token: 0x060025EA RID: 9706 RVA: 0x0007CFA4 File Offset: 0x0007B1A4
|
||||
~Context()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets the default context for the current application domain.</summary>
|
||||
/// <returns>The default context for the <see cref="T:System.AppDomain" /> namespace.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000715 RID: 1813
|
||||
// (get) Token: 0x060025EB RID: 9707 RVA: 0x0007CFDC File Offset: 0x0007B1DC
|
||||
public static Context DefaultContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppDomain.InternalGetDefaultContext();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the context ID for the current context.</summary>
|
||||
/// <returns>The context ID for the current context.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000716 RID: 1814
|
||||
// (get) Token: 0x060025EC RID: 9708 RVA: 0x0007CFE4 File Offset: 0x0007B1E4
|
||||
public virtual int ContextID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.context_id;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the array of the current context properties.</summary>
|
||||
/// <returns>The current context properties array; otherwise, null if the context does not have any properties attributed to it.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000717 RID: 1815
|
||||
// (get) Token: 0x060025ED RID: 9709 RVA: 0x0007CFEC File Offset: 0x0007B1EC
|
||||
public virtual IContextProperty[] ContextProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.context_properties == null)
|
||||
{
|
||||
return new IContextProperty[0];
|
||||
}
|
||||
return (IContextProperty[])this.context_properties.ToArray(typeof(IContextProperty[]));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000718 RID: 1816
|
||||
// (get) Token: 0x060025EE RID: 9710 RVA: 0x0007D028 File Offset: 0x0007B228
|
||||
internal bool IsDefaultContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.context_id == 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000719 RID: 1817
|
||||
// (get) Token: 0x060025EF RID: 9711 RVA: 0x0007D034 File Offset: 0x0007B234
|
||||
internal bool NeedsContextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.context_id != 0 || (Context.global_dynamic_properties != null && Context.global_dynamic_properties.HasProperties) || (this.context_dynamic_properties != null && this.context_dynamic_properties.HasProperties);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Registers a dynamic property implementing the <see cref="T:System.Runtime.Remoting.Contexts.IDynamicProperty" /> interface with the remoting service.</summary>
|
||||
/// <returns>true if the property was successfully registered; otherwise, false.</returns>
|
||||
/// <param name="prop">The dynamic property to register. </param>
|
||||
/// <param name="obj">The object/proxy for which the <paramref name="property" /> is registered. </param>
|
||||
/// <param name="ctx">The context for which the <paramref name="property" /> is registered. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">Either <paramref name="prop" /> or its name is null, or it is not dynamic (it does not implement <see cref="T:System.Runtime.Remoting.Contexts.IDynamicProperty" />). </exception>
|
||||
/// <exception cref="T:System.ArgumentException">Both an object as well as a context are specified (both <paramref name="obj" /> and <paramref name="ctx" /> are not null). </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025F0 RID: 9712 RVA: 0x0007D084 File Offset: 0x0007B284
|
||||
public static bool RegisterDynamicProperty(IDynamicProperty prop, ContextBoundObject obj, Context ctx)
|
||||
{
|
||||
DynamicPropertyCollection dynamicPropertyCollection = Context.GetDynamicPropertyCollection(obj, ctx);
|
||||
return dynamicPropertyCollection.RegisterDynamicProperty(prop);
|
||||
}
|
||||
|
||||
/// <summary>Unregisters a dynamic property implementing the <see cref="T:System.Runtime.Remoting.Contexts.IDynamicProperty" /> interface.</summary>
|
||||
/// <returns>true if the object was successfully unregistered; otherwise, false.</returns>
|
||||
/// <param name="name">The name of the dynamic property to unregister. </param>
|
||||
/// <param name="obj">The object/proxy for which the <paramref name="property" /> is registered. </param>
|
||||
/// <param name="ctx">The context for which the <paramref name="property" /> is registered. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">Both an object as well as a context are specified (both <paramref name="obj" /> and <paramref name="ctx" /> are not null). </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025F1 RID: 9713 RVA: 0x0007D0A0 File Offset: 0x0007B2A0
|
||||
public static bool UnregisterDynamicProperty(string name, ContextBoundObject obj, Context ctx)
|
||||
{
|
||||
DynamicPropertyCollection dynamicPropertyCollection = Context.GetDynamicPropertyCollection(obj, ctx);
|
||||
return dynamicPropertyCollection.UnregisterDynamicProperty(name);
|
||||
}
|
||||
|
||||
// Token: 0x060025F2 RID: 9714 RVA: 0x0007D0BC File Offset: 0x0007B2BC
|
||||
private static DynamicPropertyCollection GetDynamicPropertyCollection(ContextBoundObject obj, Context ctx)
|
||||
{
|
||||
if (ctx == null && obj != null)
|
||||
{
|
||||
if (RemotingServices.IsTransparentProxy(obj))
|
||||
{
|
||||
RealProxy realProxy = RemotingServices.GetRealProxy(obj);
|
||||
return realProxy.ObjectIdentity.ClientDynamicProperties;
|
||||
}
|
||||
return obj.ObjectIdentity.ServerDynamicProperties;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ctx != null && obj == null)
|
||||
{
|
||||
if (ctx.context_dynamic_properties == null)
|
||||
{
|
||||
ctx.context_dynamic_properties = new DynamicPropertyCollection();
|
||||
}
|
||||
return ctx.context_dynamic_properties;
|
||||
}
|
||||
if (ctx == null && obj == null)
|
||||
{
|
||||
if (Context.global_dynamic_properties == null)
|
||||
{
|
||||
Context.global_dynamic_properties = new DynamicPropertyCollection();
|
||||
}
|
||||
return Context.global_dynamic_properties;
|
||||
}
|
||||
throw new ArgumentException("Either obj or ctx must be null");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025F3 RID: 9715 RVA: 0x0007D158 File Offset: 0x0007B358
|
||||
internal static void NotifyGlobalDynamicSinks(bool start, IMessage req_msg, bool client_site, bool async)
|
||||
{
|
||||
if (Context.global_dynamic_properties != null && Context.global_dynamic_properties.HasProperties)
|
||||
{
|
||||
Context.global_dynamic_properties.NotifyMessage(start, req_msg, client_site, async);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700071A RID: 1818
|
||||
// (get) Token: 0x060025F4 RID: 9716 RVA: 0x0007D184 File Offset: 0x0007B384
|
||||
internal static bool HasGlobalDynamicSinks
|
||||
{
|
||||
get
|
||||
{
|
||||
return Context.global_dynamic_properties != null && Context.global_dynamic_properties.HasProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060025F5 RID: 9717 RVA: 0x0007D1A0 File Offset: 0x0007B3A0
|
||||
internal void NotifyDynamicSinks(bool start, IMessage req_msg, bool client_site, bool async)
|
||||
{
|
||||
if (this.context_dynamic_properties != null && this.context_dynamic_properties.HasProperties)
|
||||
{
|
||||
this.context_dynamic_properties.NotifyMessage(start, req_msg, client_site, async);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700071B RID: 1819
|
||||
// (get) Token: 0x060025F6 RID: 9718 RVA: 0x0007D1D0 File Offset: 0x0007B3D0
|
||||
internal bool HasDynamicSinks
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.context_dynamic_properties != null && this.context_dynamic_properties.HasProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700071C RID: 1820
|
||||
// (get) Token: 0x060025F7 RID: 9719 RVA: 0x0007D1EC File Offset: 0x0007B3EC
|
||||
internal bool HasExitSinks
|
||||
{
|
||||
get
|
||||
{
|
||||
return !(this.GetClientContextSinkChain() is ClientContextTerminatorSink) || this.HasDynamicSinks || Context.HasGlobalDynamicSinks;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a specific context property, specified by name.</summary>
|
||||
/// <returns>The specified context property.</returns>
|
||||
/// <param name="name">The name of the property. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025F8 RID: 9720 RVA: 0x0007D214 File Offset: 0x0007B414
|
||||
public virtual IContextProperty GetProperty(string name)
|
||||
{
|
||||
if (this.context_properties == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
foreach (object obj in this.context_properties)
|
||||
{
|
||||
IContextProperty contextProperty = (IContextProperty)obj;
|
||||
if (contextProperty.Name == name)
|
||||
{
|
||||
return contextProperty;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Sets a specific context property by name.</summary>
|
||||
/// <param name="prop">The actual context property. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is an attempt to add properties to the default context. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The context is frozen. </exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">The property or the property name is null. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025F9 RID: 9721 RVA: 0x0007D2A4 File Offset: 0x0007B4A4
|
||||
public virtual void SetProperty(IContextProperty prop)
|
||||
{
|
||||
if (prop == null)
|
||||
{
|
||||
throw new ArgumentNullException("IContextProperty");
|
||||
}
|
||||
if (this == Context.DefaultContext)
|
||||
{
|
||||
throw new InvalidOperationException("Can not add properties to default context");
|
||||
}
|
||||
if (this.frozen)
|
||||
{
|
||||
throw new InvalidOperationException("Context is Frozen");
|
||||
}
|
||||
if (this.context_properties == null)
|
||||
{
|
||||
this.context_properties = new ArrayList();
|
||||
}
|
||||
this.context_properties.Add(prop);
|
||||
}
|
||||
|
||||
/// <summary>Freezes the context, making it impossible to add or remove context properties from the current context.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The context is already frozen. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060025FA RID: 9722 RVA: 0x0007D314 File Offset: 0x0007B514
|
||||
public virtual void Freeze()
|
||||
{
|
||||
if (this.context_properties != null)
|
||||
{
|
||||
foreach (object obj in this.context_properties)
|
||||
{
|
||||
IContextProperty contextProperty = (IContextProperty)obj;
|
||||
contextProperty.Freeze(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.String" /> class representation of the current context.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> class representation of the current context.</returns>
|
||||
// Token: 0x060025FB RID: 9723 RVA: 0x0007D390 File Offset: 0x0007B590
|
||||
public override string ToString()
|
||||
{
|
||||
return "ContextID: " + this.context_id;
|
||||
}
|
||||
|
||||
// Token: 0x060025FC RID: 9724 RVA: 0x0007D3A8 File Offset: 0x0007B5A8
|
||||
internal IMessageSink GetServerContextSinkChain()
|
||||
{
|
||||
if (this.server_context_sink_chain == null)
|
||||
{
|
||||
if (Context.default_server_context_sink == null)
|
||||
{
|
||||
Context.default_server_context_sink = new ServerContextTerminatorSink();
|
||||
}
|
||||
this.server_context_sink_chain = Context.default_server_context_sink;
|
||||
if (this.context_properties != null)
|
||||
{
|
||||
for (int i = this.context_properties.Count - 1; i >= 0; i--)
|
||||
{
|
||||
IContributeServerContextSink contributeServerContextSink = this.context_properties[i] as IContributeServerContextSink;
|
||||
if (contributeServerContextSink != null)
|
||||
{
|
||||
this.server_context_sink_chain = contributeServerContextSink.GetServerContextSink(this.server_context_sink_chain);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.server_context_sink_chain;
|
||||
}
|
||||
|
||||
// Token: 0x060025FD RID: 9725 RVA: 0x0007D438 File Offset: 0x0007B638
|
||||
internal IMessageSink GetClientContextSinkChain()
|
||||
{
|
||||
if (this.client_context_sink_chain == null)
|
||||
{
|
||||
this.client_context_sink_chain = new ClientContextTerminatorSink(this);
|
||||
if (this.context_properties != null)
|
||||
{
|
||||
foreach (object obj in this.context_properties)
|
||||
{
|
||||
IContextProperty contextProperty = (IContextProperty)obj;
|
||||
IContributeClientContextSink contributeClientContextSink = contextProperty as IContributeClientContextSink;
|
||||
if (contributeClientContextSink != null)
|
||||
{
|
||||
this.client_context_sink_chain = contributeClientContextSink.GetClientContextSink(this.client_context_sink_chain);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.client_context_sink_chain;
|
||||
}
|
||||
|
||||
// Token: 0x060025FE RID: 9726 RVA: 0x0007D4E8 File Offset: 0x0007B6E8
|
||||
internal IMessageSink CreateServerObjectSinkChain(MarshalByRefObject obj, bool forceInternalExecute)
|
||||
{
|
||||
IMessageSink messageSink = new StackBuilderSink(obj, forceInternalExecute);
|
||||
messageSink = new ServerObjectTerminatorSink(messageSink);
|
||||
messageSink = new LeaseSink(messageSink);
|
||||
if (this.context_properties != null)
|
||||
{
|
||||
for (int i = this.context_properties.Count - 1; i >= 0; i--)
|
||||
{
|
||||
IContextProperty contextProperty = (IContextProperty)this.context_properties[i];
|
||||
IContributeObjectSink contributeObjectSink = contextProperty as IContributeObjectSink;
|
||||
if (contributeObjectSink != null)
|
||||
{
|
||||
messageSink = contributeObjectSink.GetObjectSink(obj, messageSink);
|
||||
}
|
||||
}
|
||||
}
|
||||
return messageSink;
|
||||
}
|
||||
|
||||
// Token: 0x060025FF RID: 9727 RVA: 0x0007D560 File Offset: 0x0007B760
|
||||
internal IMessageSink CreateEnvoySink(MarshalByRefObject serverObject)
|
||||
{
|
||||
IMessageSink messageSink = EnvoyTerminatorSink.Instance;
|
||||
if (this.context_properties != null)
|
||||
{
|
||||
foreach (object obj in this.context_properties)
|
||||
{
|
||||
IContextProperty contextProperty = (IContextProperty)obj;
|
||||
IContributeEnvoySink contributeEnvoySink = contextProperty as IContributeEnvoySink;
|
||||
if (contributeEnvoySink != null)
|
||||
{
|
||||
messageSink = contributeEnvoySink.GetEnvoySink(serverObject, messageSink);
|
||||
}
|
||||
}
|
||||
}
|
||||
return messageSink;
|
||||
}
|
||||
|
||||
// Token: 0x06002600 RID: 9728 RVA: 0x0007D5F4 File Offset: 0x0007B7F4
|
||||
internal static Context SwitchToContext(Context newContext)
|
||||
{
|
||||
return AppDomain.InternalSetContext(newContext);
|
||||
}
|
||||
|
||||
// Token: 0x06002601 RID: 9729 RVA: 0x0007D5FC File Offset: 0x0007B7FC
|
||||
internal static Context CreateNewContext(IConstructionCallMessage msg)
|
||||
{
|
||||
Context context = new Context();
|
||||
foreach (object obj in msg.ContextProperties)
|
||||
{
|
||||
IContextProperty contextProperty = (IContextProperty)obj;
|
||||
if (context.GetProperty(contextProperty.Name) == null)
|
||||
{
|
||||
context.SetProperty(contextProperty);
|
||||
}
|
||||
}
|
||||
context.Freeze();
|
||||
foreach (object obj2 in msg.ContextProperties)
|
||||
{
|
||||
IContextProperty contextProperty2 = (IContextProperty)obj2;
|
||||
if (!contextProperty2.IsNewContextOK(context))
|
||||
{
|
||||
throw new RemotingException("A context property did not approve the candidate context for activating the object");
|
||||
}
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
/// <summary>Executes code in another context.</summary>
|
||||
/// <param name="deleg">The delegate used to request the callback. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002602 RID: 9730 RVA: 0x0007D704 File Offset: 0x0007B904
|
||||
public void DoCallBack(CrossContextDelegate deleg)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this.callback_object == null)
|
||||
{
|
||||
Context context = Context.SwitchToContext(this);
|
||||
this.callback_object = new ContextCallbackObject();
|
||||
Context.SwitchToContext(context);
|
||||
}
|
||||
}
|
||||
this.callback_object.DoCallBack(deleg);
|
||||
}
|
||||
|
||||
/// <summary>Allocates an unnamed data slot.</summary>
|
||||
/// <returns>A local data slot.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002603 RID: 9731 RVA: 0x0007D774 File Offset: 0x0007B974
|
||||
public static LocalDataStoreSlot AllocateDataSlot()
|
||||
{
|
||||
return new LocalDataStoreSlot(false);
|
||||
}
|
||||
|
||||
/// <summary>Allocates a named data slot.</summary>
|
||||
/// <returns>A local data slot object.</returns>
|
||||
/// <param name="name">The required name for the data slot. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002604 RID: 9732 RVA: 0x0007D77C File Offset: 0x0007B97C
|
||||
public static LocalDataStoreSlot AllocateNamedDataSlot(string name)
|
||||
{
|
||||
object syncRoot = Context.namedSlots.SyncRoot;
|
||||
LocalDataStoreSlot localDataStoreSlot2;
|
||||
lock (syncRoot)
|
||||
{
|
||||
LocalDataStoreSlot localDataStoreSlot = Context.AllocateDataSlot();
|
||||
Context.namedSlots.Add(name, localDataStoreSlot);
|
||||
localDataStoreSlot2 = localDataStoreSlot;
|
||||
}
|
||||
return localDataStoreSlot2;
|
||||
}
|
||||
|
||||
/// <summary>Frees a named data slot on all the contexts.</summary>
|
||||
/// <param name="name">The name of the data slot to free. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002605 RID: 9733 RVA: 0x0007D7DC File Offset: 0x0007B9DC
|
||||
public static void FreeNamedDataSlot(string name)
|
||||
{
|
||||
object syncRoot = Context.namedSlots.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
Context.namedSlots.Remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Retrieves the value from the specified slot on the current context.</summary>
|
||||
/// <returns>Returns the data associated with <paramref name="slot" />. </returns>
|
||||
/// <param name="slot">The data slot that contains the data. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002606 RID: 9734 RVA: 0x0007D830 File Offset: 0x0007BA30
|
||||
public static object GetData(LocalDataStoreSlot slot)
|
||||
{
|
||||
Context currentContext = Thread.CurrentContext;
|
||||
Context context = currentContext;
|
||||
object obj;
|
||||
lock (context)
|
||||
{
|
||||
if (currentContext.datastore != null && slot.slot < currentContext.datastore.Length)
|
||||
{
|
||||
obj = currentContext.datastore[slot.slot];
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = null;
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/// <summary>Looks up a named data slot.</summary>
|
||||
/// <returns>Returns a local data slot.</returns>
|
||||
/// <param name="name">The data slot name. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002607 RID: 9735 RVA: 0x0007D8AC File Offset: 0x0007BAAC
|
||||
public static LocalDataStoreSlot GetNamedDataSlot(string name)
|
||||
{
|
||||
object syncRoot = Context.namedSlots.SyncRoot;
|
||||
LocalDataStoreSlot localDataStoreSlot2;
|
||||
lock (syncRoot)
|
||||
{
|
||||
LocalDataStoreSlot localDataStoreSlot = Context.namedSlots[name] as LocalDataStoreSlot;
|
||||
if (localDataStoreSlot == null)
|
||||
{
|
||||
localDataStoreSlot2 = Context.AllocateNamedDataSlot(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
localDataStoreSlot2 = localDataStoreSlot;
|
||||
}
|
||||
}
|
||||
return localDataStoreSlot2;
|
||||
}
|
||||
|
||||
/// <summary>Sets the data in the specified slot on the current context.</summary>
|
||||
/// <param name="slot">The data slot where the data is to be added. </param>
|
||||
/// <param name="data">The data that is to be added. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002608 RID: 9736 RVA: 0x0007D920 File Offset: 0x0007BB20
|
||||
public static void SetData(LocalDataStoreSlot slot, object data)
|
||||
{
|
||||
Context currentContext = Thread.CurrentContext;
|
||||
Context context = currentContext;
|
||||
lock (context)
|
||||
{
|
||||
if (currentContext.datastore == null)
|
||||
{
|
||||
currentContext.datastore = new object[slot.slot + 2];
|
||||
}
|
||||
else if (slot.slot >= currentContext.datastore.Length)
|
||||
{
|
||||
object[] array = new object[slot.slot + 2];
|
||||
currentContext.datastore.CopyTo(array, 0);
|
||||
currentContext.datastore = array;
|
||||
}
|
||||
currentContext.datastore[slot.slot] = data;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000ECB RID: 3787
|
||||
private int domain_id;
|
||||
|
||||
// Token: 0x04000ECC RID: 3788
|
||||
private int context_id;
|
||||
|
||||
// Token: 0x04000ECD RID: 3789
|
||||
private UIntPtr static_data;
|
||||
|
||||
// Token: 0x04000ECE RID: 3790
|
||||
private static IMessageSink default_server_context_sink;
|
||||
|
||||
// Token: 0x04000ECF RID: 3791
|
||||
private IMessageSink server_context_sink_chain;
|
||||
|
||||
// Token: 0x04000ED0 RID: 3792
|
||||
private IMessageSink client_context_sink_chain;
|
||||
|
||||
// Token: 0x04000ED1 RID: 3793
|
||||
private object[] datastore;
|
||||
|
||||
// Token: 0x04000ED2 RID: 3794
|
||||
private ArrayList context_properties;
|
||||
|
||||
// Token: 0x04000ED3 RID: 3795
|
||||
private bool frozen;
|
||||
|
||||
// Token: 0x04000ED4 RID: 3796
|
||||
private static int global_count;
|
||||
|
||||
// Token: 0x04000ED5 RID: 3797
|
||||
private static Hashtable namedSlots = new Hashtable();
|
||||
|
||||
// Token: 0x04000ED6 RID: 3798
|
||||
private static DynamicPropertyCollection global_dynamic_properties;
|
||||
|
||||
// Token: 0x04000ED7 RID: 3799
|
||||
private DynamicPropertyCollection context_dynamic_properties;
|
||||
|
||||
// Token: 0x04000ED8 RID: 3800
|
||||
private ContextCallbackObject callback_object;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Activation;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Provides the default implementations of the <see cref="T:System.Runtime.Remoting.Contexts.IContextAttribute" /> and <see cref="T:System.Runtime.Remoting.Contexts.IContextProperty" /> interfaces.</summary>
|
||||
// Token: 0x020003BC RID: 956
|
||||
[ComVisible(true)]
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
[Serializable]
|
||||
public class ContextAttribute : Attribute, IContextAttribute, IContextProperty
|
||||
{
|
||||
/// <summary>Creates an instance of the <see cref="T:System.Runtime.Remoting.Contexts.ContextAttribute" /> class with the specified name.</summary>
|
||||
/// <param name="name">The name of the context attribute. </param>
|
||||
// Token: 0x06002612 RID: 9746 RVA: 0x0007DC80 File Offset: 0x0007BE80
|
||||
public ContextAttribute(string name)
|
||||
{
|
||||
this.AttributeName = name;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the context attribute.</summary>
|
||||
/// <returns>The name of the context attribute.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x1700071E RID: 1822
|
||||
// (get) Token: 0x06002613 RID: 9747 RVA: 0x0007DC90 File Offset: 0x0007BE90
|
||||
public virtual string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.AttributeName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a Boolean value indicating whether this instance is equal to the specified object.</summary>
|
||||
/// <returns>true if <paramref name="o" /> is not null and if the object names are equivalent; otherwise, false.</returns>
|
||||
/// <param name="o">The object to compare with this instance. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002614 RID: 9748 RVA: 0x0007DC98 File Offset: 0x0007BE98
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
if (o == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!(o is ContextAttribute))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ContextAttribute contextAttribute = (ContextAttribute)o;
|
||||
return !(contextAttribute.AttributeName != this.AttributeName);
|
||||
}
|
||||
|
||||
/// <summary>Called when the context is frozen.</summary>
|
||||
/// <param name="newContext">The context to freeze. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002615 RID: 9749 RVA: 0x0007DCDC File Offset: 0x0007BEDC
|
||||
public virtual void Freeze(Context newContext)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns the hashcode for this instance of <see cref="T:System.Runtime.Remoting.Contexts.ContextAttribute" />.</summary>
|
||||
/// <returns>The hashcode for this instance of <see cref="T:System.Runtime.Remoting.Contexts.ContextAttribute" />.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002616 RID: 9750 RVA: 0x0007DCE0 File Offset: 0x0007BEE0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
if (this.AttributeName == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return this.AttributeName.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Adds the current context property to the given message.</summary>
|
||||
/// <param name="ctorMsg">The <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" /> to which to add the context property. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="ctorMsg" /> parameter is null. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002617 RID: 9751 RVA: 0x0007DCFC File Offset: 0x0007BEFC
|
||||
public virtual void GetPropertiesForNewContext(IConstructionCallMessage ctorMsg)
|
||||
{
|
||||
if (ctorMsg == null)
|
||||
{
|
||||
throw new ArgumentNullException("ctorMsg");
|
||||
}
|
||||
IList contextProperties = ctorMsg.ContextProperties;
|
||||
contextProperties.Add(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns a Boolean value indicating whether the context parameter meets the context attribute's requirements.</summary>
|
||||
/// <returns>true if the passed in context is okay; otherwise, false.</returns>
|
||||
/// <param name="ctx">The context in which to check. </param>
|
||||
/// <param name="ctorMsg">The <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" /> to which to add the context property.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">Either <paramref name="ctx" /> or <paramref name="ctorMsg" /> is null. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002618 RID: 9752 RVA: 0x0007DD2C File Offset: 0x0007BF2C
|
||||
public virtual bool IsContextOK(Context ctx, IConstructionCallMessage ctorMsg)
|
||||
{
|
||||
if (ctorMsg == null)
|
||||
{
|
||||
throw new ArgumentNullException("ctorMsg");
|
||||
}
|
||||
if (ctx == null)
|
||||
{
|
||||
throw new ArgumentNullException("ctx");
|
||||
}
|
||||
if (!ctorMsg.ActivationType.IsContextful)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
IContextProperty property = ctx.GetProperty(this.AttributeName);
|
||||
return property != null && this == property;
|
||||
}
|
||||
|
||||
/// <summary>Returns a Boolean value indicating whether the context property is compatible with the new context.</summary>
|
||||
/// <returns>true if the context property is okay with the new context; otherwise, false.</returns>
|
||||
/// <param name="newCtx">The new context in which the property has been created. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002619 RID: 9753 RVA: 0x0007DD8C File Offset: 0x0007BF8C
|
||||
public virtual bool IsNewContextOK(Context newCtx)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Indicates the name of the context attribute.</summary>
|
||||
// Token: 0x04000EDC RID: 3804
|
||||
protected string AttributeName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
// Token: 0x020003BB RID: 955
|
||||
internal class ContextCallbackObject : ContextBoundObject
|
||||
{
|
||||
// Token: 0x06002611 RID: 9745 RVA: 0x0007DC7C File Offset: 0x0007BE7C
|
||||
public void DoCallBack(CrossContextDelegate deleg)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Holds the name/value pair of the property name and the object representing the property of a context.</summary>
|
||||
// Token: 0x020003BD RID: 957
|
||||
[ComVisible(true)]
|
||||
public class ContextProperty
|
||||
{
|
||||
// Token: 0x0600261A RID: 9754 RVA: 0x0007DD90 File Offset: 0x0007BF90
|
||||
private ContextProperty(string name, object prop)
|
||||
{
|
||||
this.name = name;
|
||||
this.prop = prop;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the T:System.Runtime.Remoting.Contexts.ContextProperty class.</summary>
|
||||
/// <returns>The name of the <see cref="T:System.Runtime.Remoting.Contexts.ContextProperty" /> class.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x1700071F RID: 1823
|
||||
// (get) Token: 0x0600261B RID: 9755 RVA: 0x0007DDA8 File Offset: 0x0007BFA8
|
||||
public virtual string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the object representing the property of a context.</summary>
|
||||
/// <returns>The object representing the property of a context.</returns>
|
||||
// Token: 0x17000720 RID: 1824
|
||||
// (get) Token: 0x0600261C RID: 9756 RVA: 0x0007DDB0 File Offset: 0x0007BFB0
|
||||
public virtual object Property
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.prop;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EDD RID: 3805
|
||||
private string name;
|
||||
|
||||
// Token: 0x04000EDE RID: 3806
|
||||
private object prop;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
// Token: 0x020003BE RID: 958
|
||||
internal class CrossContextChannel : IMessageSink
|
||||
{
|
||||
// Token: 0x0600261E RID: 9758 RVA: 0x0007DDC0 File Offset: 0x0007BFC0
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
ServerIdentity serverIdentity = (ServerIdentity)RemotingServices.GetMessageTargetIdentity(msg);
|
||||
Context context = null;
|
||||
if (Thread.CurrentContext != serverIdentity.Context)
|
||||
{
|
||||
context = Context.SwitchToContext(serverIdentity.Context);
|
||||
}
|
||||
IMessage message;
|
||||
try
|
||||
{
|
||||
Context.NotifyGlobalDynamicSinks(true, msg, false, false);
|
||||
Thread.CurrentContext.NotifyDynamicSinks(true, msg, false, false);
|
||||
message = serverIdentity.Context.GetServerContextSinkChain().SyncProcessMessage(msg);
|
||||
Context.NotifyGlobalDynamicSinks(false, msg, false, false);
|
||||
Thread.CurrentContext.NotifyDynamicSinks(false, msg, false, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = new ReturnMessage(ex, (IMethodCallMessage)msg);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (context != null)
|
||||
{
|
||||
Context.SwitchToContext(context);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x0600261F RID: 9759 RVA: 0x0007DE94 File Offset: 0x0007C094
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
ServerIdentity serverIdentity = (ServerIdentity)RemotingServices.GetMessageTargetIdentity(msg);
|
||||
Context context = null;
|
||||
if (Thread.CurrentContext != serverIdentity.Context)
|
||||
{
|
||||
context = Context.SwitchToContext(serverIdentity.Context);
|
||||
}
|
||||
IMessageCtrl messageCtrl2;
|
||||
try
|
||||
{
|
||||
Context.NotifyGlobalDynamicSinks(true, msg, false, true);
|
||||
Thread.CurrentContext.NotifyDynamicSinks(true, msg, false, false);
|
||||
if (replySink != null)
|
||||
{
|
||||
replySink = new CrossContextChannel.ContextRestoreSink(replySink, context, msg);
|
||||
}
|
||||
IMessageCtrl messageCtrl = serverIdentity.AsyncObjectProcessMessage(msg, replySink);
|
||||
if (replySink == null)
|
||||
{
|
||||
Context.NotifyGlobalDynamicSinks(false, msg, false, false);
|
||||
Thread.CurrentContext.NotifyDynamicSinks(false, msg, false, false);
|
||||
}
|
||||
messageCtrl2 = messageCtrl;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (replySink != null)
|
||||
{
|
||||
replySink.SyncProcessMessage(new ReturnMessage(ex, (IMethodCallMessage)msg));
|
||||
}
|
||||
messageCtrl2 = null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (context != null)
|
||||
{
|
||||
Context.SwitchToContext(context);
|
||||
}
|
||||
}
|
||||
return messageCtrl2;
|
||||
}
|
||||
|
||||
// Token: 0x17000721 RID: 1825
|
||||
// (get) Token: 0x06002620 RID: 9760 RVA: 0x0007DF90 File Offset: 0x0007C190
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020003BF RID: 959
|
||||
private class ContextRestoreSink : IMessageSink
|
||||
{
|
||||
// Token: 0x06002621 RID: 9761 RVA: 0x0007DF94 File Offset: 0x0007C194
|
||||
public ContextRestoreSink(IMessageSink next, Context context, IMessage call)
|
||||
{
|
||||
this._next = next;
|
||||
this._context = context;
|
||||
this._call = call;
|
||||
}
|
||||
|
||||
// Token: 0x06002622 RID: 9762 RVA: 0x0007DFB4 File Offset: 0x0007C1B4
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
IMessage message;
|
||||
try
|
||||
{
|
||||
Context.NotifyGlobalDynamicSinks(false, msg, false, false);
|
||||
Thread.CurrentContext.NotifyDynamicSinks(false, msg, false, false);
|
||||
message = this._next.SyncProcessMessage(msg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = new ReturnMessage(ex, (IMethodCallMessage)this._call);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (this._context != null)
|
||||
{
|
||||
Context.SwitchToContext(this._context);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x06002623 RID: 9763 RVA: 0x0007E05C File Offset: 0x0007C25C
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x17000722 RID: 1826
|
||||
// (get) Token: 0x06002624 RID: 9764 RVA: 0x0007E064 File Offset: 0x0007C264
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EDF RID: 3807
|
||||
private IMessageSink _next;
|
||||
|
||||
// Token: 0x04000EE0 RID: 3808
|
||||
private Context _context;
|
||||
|
||||
// Token: 0x04000EE1 RID: 3809
|
||||
private IMessage _call;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Represents the method that will handle the requests of execution of some code in another context.</summary>
|
||||
// Token: 0x020006D9 RID: 1753
|
||||
// (Invoke) Token: 0x060041EC RID: 16876
|
||||
[ComVisible(true)]
|
||||
public delegate void CrossContextDelegate();
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
// Token: 0x020003B9 RID: 953
|
||||
internal class DynamicPropertyCollection
|
||||
{
|
||||
// Token: 0x1700071D RID: 1821
|
||||
// (get) Token: 0x0600260A RID: 9738 RVA: 0x0007D9E0 File Offset: 0x0007BBE0
|
||||
public bool HasProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._properties.Count > 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600260B RID: 9739 RVA: 0x0007D9F0 File Offset: 0x0007BBF0
|
||||
public bool RegisterDynamicProperty(IDynamicProperty prop)
|
||||
{
|
||||
bool flag;
|
||||
lock (this)
|
||||
{
|
||||
if (this.FindProperty(prop.Name) != -1)
|
||||
{
|
||||
throw new InvalidOperationException("Another property by this name already exists");
|
||||
}
|
||||
ArrayList arrayList = new ArrayList(this._properties);
|
||||
DynamicPropertyCollection.DynamicPropertyReg dynamicPropertyReg = new DynamicPropertyCollection.DynamicPropertyReg();
|
||||
dynamicPropertyReg.Property = prop;
|
||||
IContributeDynamicSink contributeDynamicSink = prop as IContributeDynamicSink;
|
||||
if (contributeDynamicSink != null)
|
||||
{
|
||||
dynamicPropertyReg.Sink = contributeDynamicSink.GetDynamicSink();
|
||||
}
|
||||
arrayList.Add(dynamicPropertyReg);
|
||||
this._properties = arrayList;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600260C RID: 9740 RVA: 0x0007DA98 File Offset: 0x0007BC98
|
||||
public bool UnregisterDynamicProperty(string name)
|
||||
{
|
||||
bool flag;
|
||||
lock (this)
|
||||
{
|
||||
int num = this.FindProperty(name);
|
||||
if (num == -1)
|
||||
{
|
||||
throw new RemotingException("A property with the name " + name + " was not found");
|
||||
}
|
||||
this._properties.RemoveAt(num);
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600260D RID: 9741 RVA: 0x0007DB10 File Offset: 0x0007BD10
|
||||
public void NotifyMessage(bool start, IMessage msg, bool client_site, bool async)
|
||||
{
|
||||
ArrayList properties = this._properties;
|
||||
if (start)
|
||||
{
|
||||
foreach (object obj in properties)
|
||||
{
|
||||
DynamicPropertyCollection.DynamicPropertyReg dynamicPropertyReg = (DynamicPropertyCollection.DynamicPropertyReg)obj;
|
||||
if (dynamicPropertyReg.Sink != null)
|
||||
{
|
||||
dynamicPropertyReg.Sink.ProcessMessageStart(msg, client_site, async);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (object obj2 in properties)
|
||||
{
|
||||
DynamicPropertyCollection.DynamicPropertyReg dynamicPropertyReg2 = (DynamicPropertyCollection.DynamicPropertyReg)obj2;
|
||||
if (dynamicPropertyReg2.Sink != null)
|
||||
{
|
||||
dynamicPropertyReg2.Sink.ProcessMessageFinish(msg, client_site, async);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600260E RID: 9742 RVA: 0x0007DC18 File Offset: 0x0007BE18
|
||||
private int FindProperty(string name)
|
||||
{
|
||||
for (int i = 0; i < this._properties.Count; i++)
|
||||
{
|
||||
if (((DynamicPropertyCollection.DynamicPropertyReg)this._properties[i]).Property.Name == name)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x04000ED9 RID: 3801
|
||||
private ArrayList _properties = new ArrayList();
|
||||
|
||||
// Token: 0x020003BA RID: 954
|
||||
private class DynamicPropertyReg
|
||||
{
|
||||
// Token: 0x04000EDA RID: 3802
|
||||
public IDynamicProperty Property;
|
||||
|
||||
// Token: 0x04000EDB RID: 3803
|
||||
public IDynamicMessageSink Sink;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Activation;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Identifies a context attribute.</summary>
|
||||
// Token: 0x020003C0 RID: 960
|
||||
[ComVisible(true)]
|
||||
public interface IContextAttribute
|
||||
{
|
||||
/// <summary>Returns context properties to the caller in the given message.</summary>
|
||||
/// <param name="msg">The <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" /> to which to add the context properties. </param>
|
||||
// Token: 0x06002625 RID: 9765
|
||||
void GetPropertiesForNewContext(IConstructionCallMessage msg);
|
||||
|
||||
/// <summary>Returns a Boolean value indicating whether the specified context meets the context attribute's requirements.</summary>
|
||||
/// <returns>true if the passed in context is okay; otherwise, false.</returns>
|
||||
/// <param name="ctx">The context to check against the current context attribute. </param>
|
||||
/// <param name="msg">The construction call, parameters of which need to be checked against the current context. </param>
|
||||
// Token: 0x06002626 RID: 9766
|
||||
bool IsContextOK(Context ctx, IConstructionCallMessage msg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Gathers naming information from the context property and determines whether the new context is ok for the context property.</summary>
|
||||
// Token: 0x020003C1 RID: 961
|
||||
[ComVisible(true)]
|
||||
public interface IContextProperty
|
||||
{
|
||||
/// <summary>Gets the name of the property under which it will be added to the context.</summary>
|
||||
/// <returns>The name of the property.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000723 RID: 1827
|
||||
// (get) Token: 0x06002627 RID: 9767
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>Called when the context is frozen.</summary>
|
||||
/// <param name="newContext">The context to freeze. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002628 RID: 9768
|
||||
void Freeze(Context newContext);
|
||||
|
||||
/// <summary>Returns a Boolean value indicating whether the context property is compatible with the new context.</summary>
|
||||
/// <returns>true if the context property can coexist with the other context properties in the given context; otherwise, false.</returns>
|
||||
/// <param name="newCtx">The new context in which the <see cref="T:System.Runtime.Remoting.Contexts.ContextProperty" /> has been created. </param>
|
||||
// Token: 0x06002629 RID: 9769
|
||||
bool IsNewContextOK(Context newCtx);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Activation;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Indicates that the implementing property is interested in participating in activation and might not have provided a message sink.</summary>
|
||||
// Token: 0x020003C2 RID: 962
|
||||
[ComVisible(true)]
|
||||
public interface IContextPropertyActivator
|
||||
{
|
||||
/// <summary>Called on each client context property that has this interface, before the construction request leaves the client.</summary>
|
||||
/// <param name="msg">An <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" />. </param>
|
||||
// Token: 0x0600262A RID: 9770
|
||||
void CollectFromClientContext(IConstructionCallMessage msg);
|
||||
|
||||
/// <summary>Called on each server context property that has this interface, before the construction response leaves the server for the client.</summary>
|
||||
/// <param name="msg">An <see cref="T:System.Runtime.Remoting.Activation.IConstructionReturnMessage" />. </param>
|
||||
// Token: 0x0600262B RID: 9771
|
||||
void CollectFromServerContext(IConstructionReturnMessage msg);
|
||||
|
||||
/// <summary>Called on each client context property that has this interface, when the construction request returns to the client from the server.</summary>
|
||||
/// <returns>true if successful; otherwise, false.</returns>
|
||||
/// <param name="msg">An <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" />. </param>
|
||||
// Token: 0x0600262C RID: 9772
|
||||
bool DeliverClientContextToServerContext(IConstructionCallMessage msg);
|
||||
|
||||
/// <summary>Called on each client context property that has this interface, when the construction request returns to the client from the server.</summary>
|
||||
/// <returns>true if successful; otherwise, false.</returns>
|
||||
/// <param name="msg">An <see cref="T:System.Runtime.Remoting.Activation.IConstructionReturnMessage" />. </param>
|
||||
// Token: 0x0600262D RID: 9773
|
||||
bool DeliverServerContextToClientContext(IConstructionReturnMessage msg);
|
||||
|
||||
/// <summary>Indicates whether it is all right to activate the object type indicated in the <paramref name="msg" /> parameter.</summary>
|
||||
/// <returns>A Boolean value indicating whether the requested type can be activated.</returns>
|
||||
/// <param name="msg">An <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" />. </param>
|
||||
// Token: 0x0600262E RID: 9774
|
||||
bool IsOKToActivate(IConstructionCallMessage msg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Contributes an interception sink at the context boundary on the client end of a remoting call.</summary>
|
||||
// Token: 0x020003C3 RID: 963
|
||||
[ComVisible(true)]
|
||||
public interface IContributeClientContextSink
|
||||
{
|
||||
/// <summary>Takes the first sink in the chain of sinks composed so far, and then chains its message sink in front of the chain already formed.</summary>
|
||||
/// <returns>The composite sink chain.</returns>
|
||||
/// <param name="nextSink">The chain of sinks composed so far. </param>
|
||||
// Token: 0x0600262F RID: 9775
|
||||
IMessageSink GetClientContextSink(IMessageSink nextSink);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Indicates that the implementing property will be registered at runtime through the <see cref="M:System.Runtime.Remoting.Contexts.Context.RegisterDynamicProperty(System.Runtime.Remoting.Contexts.IDynamicProperty,System.ContextBoundObject,System.Runtime.Remoting.Contexts.Context)" /> method.</summary>
|
||||
// Token: 0x020003C4 RID: 964
|
||||
[ComVisible(true)]
|
||||
public interface IContributeDynamicSink
|
||||
{
|
||||
/// <summary>Returns the message sink that will be notified of call start and finish events through the <see cref="T:System.Runtime.Remoting.Contexts.IDynamicMessageSink" /> interface.</summary>
|
||||
/// <returns>A dynamic sink that exposes the <see cref="T:System.Runtime.Remoting.Contexts.IDynamicMessageSink" /> interface.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002630 RID: 9776
|
||||
IDynamicMessageSink GetDynamicSink();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Contributes an envoy message sink on the client end.</summary>
|
||||
// Token: 0x020003C5 RID: 965
|
||||
[ComVisible(true)]
|
||||
public interface IContributeEnvoySink
|
||||
{
|
||||
/// <summary>Takes the first sink in the chain of sinks composed so far, and then chains its message sink in front of the chain already formed.</summary>
|
||||
/// <returns>The composite sink chain.</returns>
|
||||
/// <param name="obj">The server object for which the chain is being created. </param>
|
||||
/// <param name="nextSink">The chain of sinks composed so far. </param>
|
||||
// Token: 0x06002631 RID: 9777
|
||||
IMessageSink GetEnvoySink(MarshalByRefObject obj, IMessageSink nextSink);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Contributes an object-specific interception sink on the server end of a remoting call.</summary>
|
||||
// Token: 0x020003C6 RID: 966
|
||||
[ComVisible(true)]
|
||||
public interface IContributeObjectSink
|
||||
{
|
||||
/// <summary>Chains the message sink of the provided server object in front of the given sink chain.</summary>
|
||||
/// <returns>The composite sink chain.</returns>
|
||||
/// <param name="obj">The server object which provides the message sink that is to be chained in front of the given chain. </param>
|
||||
/// <param name="nextSink">The chain of sinks composed so far. </param>
|
||||
// Token: 0x06002632 RID: 9778
|
||||
IMessageSink GetObjectSink(MarshalByRefObject obj, IMessageSink nextSink);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Contributes an interception sink at the context boundary on the server end of a remoting call.</summary>
|
||||
// Token: 0x020003C7 RID: 967
|
||||
[ComVisible(true)]
|
||||
public interface IContributeServerContextSink
|
||||
{
|
||||
/// <summary>Takes the first sink in the chain of sinks composed so far, and then chains its message sink in front of the chain already formed.</summary>
|
||||
/// <returns>The composite sink chain.</returns>
|
||||
/// <param name="nextSink">The chain of sinks composed so far. </param>
|
||||
// Token: 0x06002633 RID: 9779
|
||||
IMessageSink GetServerContextSink(IMessageSink nextSink);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Indicates that the implementing message sink will be provided by dynamically registered properties.</summary>
|
||||
// Token: 0x020003C8 RID: 968
|
||||
[ComVisible(true)]
|
||||
public interface IDynamicMessageSink
|
||||
{
|
||||
/// <summary>Indicates that a call is returning.</summary>
|
||||
/// <param name="replyMsg">A reply message. </param>
|
||||
/// <param name="bCliSide">A value of true if the method is invoked on the client side and false if it is invoked on the server side. </param>
|
||||
/// <param name="bAsync">A value of true if this is an asynchronic call and false if it is a synchronic call. </param>
|
||||
// Token: 0x06002634 RID: 9780
|
||||
void ProcessMessageFinish(IMessage replyMsg, bool bCliSide, bool bAsync);
|
||||
|
||||
/// <summary>Indicates that a call is starting.</summary>
|
||||
/// <param name="reqMsg">A request message. </param>
|
||||
/// <param name="bCliSide">A value of true if the method is invoked on the client side and false if the method is on the server side. </param>
|
||||
/// <param name="bAsync">A value of true if this is an asynchronic call and false if it is a synchronic call. </param>
|
||||
// Token: 0x06002635 RID: 9781
|
||||
void ProcessMessageStart(IMessage reqMsg, bool bCliSide, bool bAsync);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Indicates that the implementing property should be registered at runtime through the <see cref="M:System.Runtime.Remoting.Contexts.Context.RegisterDynamicProperty(System.Runtime.Remoting.Contexts.IDynamicProperty,System.ContextBoundObject,System.Runtime.Remoting.Contexts.Context)" /> method.</summary>
|
||||
// Token: 0x020003C9 RID: 969
|
||||
[ComVisible(true)]
|
||||
public interface IDynamicProperty
|
||||
{
|
||||
/// <summary>Gets the name of the dynamic property.</summary>
|
||||
/// <returns>The name of the dynamic property.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000724 RID: 1828
|
||||
// (get) Token: 0x06002636 RID: 9782
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Activation;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
/// <summary>Enforces a synchronization domain for the current context and all contexts that share the same instance.</summary>
|
||||
// Token: 0x020003CA RID: 970
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class SynchronizationAttribute : ContextAttribute, IContributeClientContextSink, IContributeServerContextSink
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> class with default values.</summary>
|
||||
// Token: 0x06002637 RID: 9783 RVA: 0x0007E06C File Offset: 0x0007C26C
|
||||
public SynchronizationAttribute()
|
||||
: this(8, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> class with a Boolean value indicating whether reentry is required.</summary>
|
||||
/// <param name="reEntrant">A Boolean value indicating whether reentry is required. </param>
|
||||
// Token: 0x06002638 RID: 9784 RVA: 0x0007E078 File Offset: 0x0007C278
|
||||
public SynchronizationAttribute(bool reEntrant)
|
||||
: this(8, reEntrant)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> class with a flag indicating the behavior of the object to which this attribute is applied.</summary>
|
||||
/// <param name="flag">An integer value indicating the behavior of the object to which this attribute is applied. </param>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="flag" /> parameter was not one of the defined flags. </exception>
|
||||
// Token: 0x06002639 RID: 9785 RVA: 0x0007E084 File Offset: 0x0007C284
|
||||
public SynchronizationAttribute(int flag)
|
||||
: this(flag, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> class with a flag indicating the behavior of the object to which this attribute is applied, and a Boolean value indicating whether reentry is required.</summary>
|
||||
/// <param name="flag">An integer value indicating the behavior of the object to which this attribute is applied. </param>
|
||||
/// <param name="reEntrant">true if reentry is required, and callouts must be intercepted and serialized; otherwise, false. </param>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="flag" /> parameter was not one of the defined flags. </exception>
|
||||
// Token: 0x0600263A RID: 9786 RVA: 0x0007E090 File Offset: 0x0007C290
|
||||
public SynchronizationAttribute(int flag, bool reEntrant)
|
||||
: base("Synchronization")
|
||||
{
|
||||
if (flag != 1 && flag != 4 && flag != 8 && flag != 2)
|
||||
{
|
||||
throw new ArgumentException("flag");
|
||||
}
|
||||
this._bReEntrant = reEntrant;
|
||||
this._flavor = flag;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a Boolean value indicating whether reentry is required.</summary>
|
||||
/// <returns>A Boolean value indicating whether reentry is required.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000725 RID: 1829
|
||||
// (get) Token: 0x0600263B RID: 9787 RVA: 0x0007E0EC File Offset: 0x0007C2EC
|
||||
public virtual bool IsReEntrant
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._bReEntrant;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a Boolean value indicating whether the <see cref="T:System.Runtime.Remoting.Contexts.Context" /> implementing this instance of <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> is locked.</summary>
|
||||
/// <returns>A Boolean value indicating whether the <see cref="T:System.Runtime.Remoting.Contexts.Context" /> implementing this instance of <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> is locked.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000726 RID: 1830
|
||||
// (get) Token: 0x0600263C RID: 9788 RVA: 0x0007E0F4 File Offset: 0x0007C2F4
|
||||
// (set) Token: 0x0600263D RID: 9789 RVA: 0x0007E0FC File Offset: 0x0007C2FC
|
||||
public virtual bool Locked
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._locked;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this._mutex.WaitOne();
|
||||
lock (this)
|
||||
{
|
||||
this._lockCount++;
|
||||
if (this._lockCount > 1)
|
||||
{
|
||||
this.ReleaseLock();
|
||||
}
|
||||
this._ownerThread = Thread.CurrentThread;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
while (this._lockCount > 0 && this._ownerThread == Thread.CurrentThread)
|
||||
{
|
||||
this._lockCount--;
|
||||
this._mutex.ReleaseMutex();
|
||||
this._ownerThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600263E RID: 9790 RVA: 0x0007E1E8 File Offset: 0x0007C3E8
|
||||
internal void AcquireLock()
|
||||
{
|
||||
this._mutex.WaitOne();
|
||||
lock (this)
|
||||
{
|
||||
this._ownerThread = Thread.CurrentThread;
|
||||
this._lockCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600263F RID: 9791 RVA: 0x0007E24C File Offset: 0x0007C44C
|
||||
internal void ReleaseLock()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this._lockCount > 0 && this._ownerThread == Thread.CurrentThread)
|
||||
{
|
||||
this._lockCount--;
|
||||
this._mutex.ReleaseMutex();
|
||||
this._ownerThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds the Synchronized context property to the specified <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" />.</summary>
|
||||
/// <param name="ctorMsg">The <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" /> to which to add the property. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002640 RID: 9792 RVA: 0x0007E2C8 File Offset: 0x0007C4C8
|
||||
[ComVisible(true)]
|
||||
public override void GetPropertiesForNewContext(IConstructionCallMessage ctorMsg)
|
||||
{
|
||||
if (this._flavor != 1)
|
||||
{
|
||||
ctorMsg.ContextProperties.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a CallOut sink and chains it in front of the provided chain of sinks at the context boundary on the client end of a remoting call.</summary>
|
||||
/// <returns>The composite sink chain with the new CallOut sink.</returns>
|
||||
/// <param name="nextSink">The chain of sinks composed so far. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002641 RID: 9793 RVA: 0x0007E2E4 File Offset: 0x0007C4E4
|
||||
public virtual IMessageSink GetClientContextSink(IMessageSink nextSink)
|
||||
{
|
||||
return new SynchronizedClientContextSink(nextSink, this);
|
||||
}
|
||||
|
||||
/// <summary>Creates a synchronized dispatch sink and chains it in front of the provided chain of sinks at the context boundary on the server end of a remoting call.</summary>
|
||||
/// <returns>The composite sink chain with the new synchronized dispatch sink.</returns>
|
||||
/// <param name="nextSink">The chain of sinks composed so far. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002642 RID: 9794 RVA: 0x0007E2F0 File Offset: 0x0007C4F0
|
||||
public virtual IMessageSink GetServerContextSink(IMessageSink nextSink)
|
||||
{
|
||||
return new SynchronizedServerContextSink(nextSink, this);
|
||||
}
|
||||
|
||||
/// <summary>Returns a Boolean value indicating whether the context parameter meets the context attribute's requirements.</summary>
|
||||
/// <returns>true if the passed in context is OK; otherwise, false.</returns>
|
||||
/// <param name="ctx">The context to check. </param>
|
||||
/// <param name="msg">Information gathered at construction time of the context bound object marked by this attribute. The <see cref="T:System.Runtime.Remoting.Contexts.SynchronizationAttribute" /> can inspect, add to, and remove properties from the context while determining if the context is acceptable to it. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="ctx" /> or <paramref name="msg" /> parameter is null. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002643 RID: 9795 RVA: 0x0007E2FC File Offset: 0x0007C4FC
|
||||
[ComVisible(true)]
|
||||
public override bool IsContextOK(Context ctx, IConstructionCallMessage msg)
|
||||
{
|
||||
SynchronizationAttribute synchronizationAttribute = ctx.GetProperty("Synchronization") as SynchronizationAttribute;
|
||||
switch (this._flavor)
|
||||
{
|
||||
case 1:
|
||||
return synchronizationAttribute == null;
|
||||
case 2:
|
||||
return true;
|
||||
case 4:
|
||||
return synchronizationAttribute != null;
|
||||
case 8:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06002644 RID: 9796 RVA: 0x0007E360 File Offset: 0x0007C560
|
||||
internal static void ExitContext()
|
||||
{
|
||||
if (Thread.CurrentContext.IsDefaultContext)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SynchronizationAttribute synchronizationAttribute = Thread.CurrentContext.GetProperty("Synchronization") as SynchronizationAttribute;
|
||||
if (synchronizationAttribute == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
synchronizationAttribute.Locked = false;
|
||||
}
|
||||
|
||||
// Token: 0x06002645 RID: 9797 RVA: 0x0007E3A0 File Offset: 0x0007C5A0
|
||||
internal static void EnterContext()
|
||||
{
|
||||
if (Thread.CurrentContext.IsDefaultContext)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SynchronizationAttribute synchronizationAttribute = Thread.CurrentContext.GetProperty("Synchronization") as SynchronizationAttribute;
|
||||
if (synchronizationAttribute == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
synchronizationAttribute.Locked = true;
|
||||
}
|
||||
|
||||
/// <summary>Indicates that the class to which this attribute is applied cannot be created in a context that has synchronization. This field is constant.</summary>
|
||||
// Token: 0x04000EE2 RID: 3810
|
||||
public const int NOT_SUPPORTED = 1;
|
||||
|
||||
/// <summary>Indicates that the class to which this attribute is applied is not dependent on whether the context has synchronization. This field is constant.</summary>
|
||||
// Token: 0x04000EE3 RID: 3811
|
||||
public const int SUPPORTED = 2;
|
||||
|
||||
/// <summary>Indicates that the class to which this attribute is applied must be created in a context that has synchronization. This field is constant.</summary>
|
||||
// Token: 0x04000EE4 RID: 3812
|
||||
public const int REQUIRED = 4;
|
||||
|
||||
/// <summary>Indicates that the class to which this attribute is applied must be created in a context with a new instance of the synchronization property each time. This field is constant.</summary>
|
||||
// Token: 0x04000EE5 RID: 3813
|
||||
public const int REQUIRES_NEW = 8;
|
||||
|
||||
// Token: 0x04000EE6 RID: 3814
|
||||
private bool _bReEntrant;
|
||||
|
||||
// Token: 0x04000EE7 RID: 3815
|
||||
private int _flavor;
|
||||
|
||||
// Token: 0x04000EE8 RID: 3816
|
||||
[NonSerialized]
|
||||
private bool _locked;
|
||||
|
||||
// Token: 0x04000EE9 RID: 3817
|
||||
[NonSerialized]
|
||||
private int _lockCount;
|
||||
|
||||
// Token: 0x04000EEA RID: 3818
|
||||
[NonSerialized]
|
||||
private Mutex _mutex = new Mutex(false);
|
||||
|
||||
// Token: 0x04000EEB RID: 3819
|
||||
[NonSerialized]
|
||||
private Thread _ownerThread;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
// Token: 0x020003CB RID: 971
|
||||
internal class SynchronizedClientContextSink : IMessageSink
|
||||
{
|
||||
// Token: 0x06002646 RID: 9798 RVA: 0x0007E3E0 File Offset: 0x0007C5E0
|
||||
public SynchronizedClientContextSink(IMessageSink next, SynchronizationAttribute att)
|
||||
{
|
||||
this._att = att;
|
||||
this._next = next;
|
||||
}
|
||||
|
||||
// Token: 0x17000727 RID: 1831
|
||||
// (get) Token: 0x06002647 RID: 9799 RVA: 0x0007E3F8 File Offset: 0x0007C5F8
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002648 RID: 9800 RVA: 0x0007E400 File Offset: 0x0007C600
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
if (this._att.IsReEntrant)
|
||||
{
|
||||
this._att.ReleaseLock();
|
||||
replySink = new SynchronizedContextReplySink(replySink, this._att, true);
|
||||
}
|
||||
return this._next.AsyncProcessMessage(msg, replySink);
|
||||
}
|
||||
|
||||
// Token: 0x06002649 RID: 9801 RVA: 0x0007E444 File Offset: 0x0007C644
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
if (this._att.IsReEntrant)
|
||||
{
|
||||
this._att.ReleaseLock();
|
||||
}
|
||||
IMessage message;
|
||||
try
|
||||
{
|
||||
message = this._next.SyncProcessMessage(msg);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (this._att.IsReEntrant)
|
||||
{
|
||||
this._att.AcquireLock();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x04000EEC RID: 3820
|
||||
private IMessageSink _next;
|
||||
|
||||
// Token: 0x04000EED RID: 3821
|
||||
private SynchronizationAttribute _att;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
// Token: 0x020003CD RID: 973
|
||||
internal class SynchronizedContextReplySink : IMessageSink
|
||||
{
|
||||
// Token: 0x0600264E RID: 9806 RVA: 0x0007E560 File Offset: 0x0007C760
|
||||
public SynchronizedContextReplySink(IMessageSink next, SynchronizationAttribute att, bool newLock)
|
||||
{
|
||||
this._newLock = newLock;
|
||||
this._next = next;
|
||||
this._att = att;
|
||||
}
|
||||
|
||||
// Token: 0x17000729 RID: 1833
|
||||
// (get) Token: 0x0600264F RID: 9807 RVA: 0x0007E580 File Offset: 0x0007C780
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002650 RID: 9808 RVA: 0x0007E588 File Offset: 0x0007C788
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06002651 RID: 9809 RVA: 0x0007E590 File Offset: 0x0007C790
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
if (this._newLock)
|
||||
{
|
||||
this._att.AcquireLock();
|
||||
}
|
||||
else
|
||||
{
|
||||
this._att.ReleaseLock();
|
||||
}
|
||||
IMessage message;
|
||||
try
|
||||
{
|
||||
message = this._next.SyncProcessMessage(msg);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (this._newLock)
|
||||
{
|
||||
this._att.ReleaseLock();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x04000EF0 RID: 3824
|
||||
private IMessageSink _next;
|
||||
|
||||
// Token: 0x04000EF1 RID: 3825
|
||||
private bool _newLock;
|
||||
|
||||
// Token: 0x04000EF2 RID: 3826
|
||||
private SynchronizationAttribute _att;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Contexts
|
||||
{
|
||||
// Token: 0x020003CC RID: 972
|
||||
internal class SynchronizedServerContextSink : IMessageSink
|
||||
{
|
||||
// Token: 0x0600264A RID: 9802 RVA: 0x0007E4BC File Offset: 0x0007C6BC
|
||||
public SynchronizedServerContextSink(IMessageSink next, SynchronizationAttribute att)
|
||||
{
|
||||
this._att = att;
|
||||
this._next = next;
|
||||
}
|
||||
|
||||
// Token: 0x17000728 RID: 1832
|
||||
// (get) Token: 0x0600264B RID: 9803 RVA: 0x0007E4D4 File Offset: 0x0007C6D4
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600264C RID: 9804 RVA: 0x0007E4DC File Offset: 0x0007C6DC
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
this._att.AcquireLock();
|
||||
replySink = new SynchronizedContextReplySink(replySink, this._att, false);
|
||||
return this._next.AsyncProcessMessage(msg, replySink);
|
||||
}
|
||||
|
||||
// Token: 0x0600264D RID: 9805 RVA: 0x0007E508 File Offset: 0x0007C708
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
this._att.AcquireLock();
|
||||
IMessage message;
|
||||
try
|
||||
{
|
||||
message = this._next.SyncProcessMessage(msg);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this._att.ReleaseLock();
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
// Token: 0x04000EEE RID: 3822
|
||||
private IMessageSink _next;
|
||||
|
||||
// Token: 0x04000EEF RID: 3823
|
||||
private SynchronizationAttribute _att;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Specifies how custom errors are handled.</summary>
|
||||
// Token: 0x0200043A RID: 1082
|
||||
[ComVisible(true)]
|
||||
public enum CustomErrorsModes
|
||||
{
|
||||
/// <summary>All callers receive filtered exception information.</summary>
|
||||
// Token: 0x04001007 RID: 4103
|
||||
On,
|
||||
/// <summary>All callers receive complete exception information.</summary>
|
||||
// Token: 0x04001008 RID: 4104
|
||||
Off,
|
||||
/// <summary>Local callers receive complete exception information; remote callers receive filtered exception information.</summary>
|
||||
// Token: 0x04001009 RID: 4105
|
||||
RemoteOnly
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000453 RID: 1107
|
||||
internal class DisposerReplySink : IMessageSink
|
||||
{
|
||||
// Token: 0x06002AAA RID: 10922 RVA: 0x0008A4AC File Offset: 0x000886AC
|
||||
public DisposerReplySink(IMessageSink next, IDisposable disposable)
|
||||
{
|
||||
this._next = next;
|
||||
this._disposable = disposable;
|
||||
}
|
||||
|
||||
// Token: 0x06002AAB RID: 10923 RVA: 0x0008A4C4 File Offset: 0x000886C4
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
this._disposable.Dispose();
|
||||
return this._next.SyncProcessMessage(msg);
|
||||
}
|
||||
|
||||
// Token: 0x06002AAC RID: 10924 RVA: 0x0008A4E0 File Offset: 0x000886E0
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x17000865 RID: 2149
|
||||
// (get) Token: 0x06002AAD RID: 10925 RVA: 0x0008A4E8 File Offset: 0x000886E8
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04001051 RID: 4177
|
||||
private IMessageSink _next;
|
||||
|
||||
// Token: 0x04001052 RID: 4178
|
||||
private IDisposable _disposable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x0200043B RID: 1083
|
||||
[Serializable]
|
||||
internal class EnvoyInfo : IEnvoyInfo
|
||||
{
|
||||
// Token: 0x060029C2 RID: 10690 RVA: 0x00086478 File Offset: 0x00084678
|
||||
public EnvoyInfo(IMessageSink sinks)
|
||||
{
|
||||
this.envoySinks = sinks;
|
||||
}
|
||||
|
||||
// Token: 0x17000845 RID: 2117
|
||||
// (get) Token: 0x060029C3 RID: 10691 RVA: 0x00086488 File Offset: 0x00084688
|
||||
// (set) Token: 0x060029C4 RID: 10692 RVA: 0x00086490 File Offset: 0x00084690
|
||||
public IMessageSink EnvoySinks
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.envoySinks;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.envoySinks = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400100A RID: 4106
|
||||
private IMessageSink envoySinks;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000449 RID: 1097
|
||||
internal class FormatterData : ProviderData
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Provides custom channel information that is carried along with the <see cref="T:System.Runtime.Remoting.ObjRef" />.</summary>
|
||||
// Token: 0x0200043C RID: 1084
|
||||
[ComVisible(true)]
|
||||
public interface IChannelInfo
|
||||
{
|
||||
/// <summary>Gets and sets the channel data for each channel.</summary>
|
||||
/// <returns>The channel data for each channel.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x17000846 RID: 2118
|
||||
// (get) Token: 0x060029C5 RID: 10693
|
||||
// (set) Token: 0x060029C6 RID: 10694
|
||||
object[] ChannelData { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Provides envoy information.</summary>
|
||||
// Token: 0x0200043D RID: 1085
|
||||
[ComVisible(true)]
|
||||
public interface IEnvoyInfo
|
||||
{
|
||||
/// <summary>Gets or sets the list of envoys that were contributed by the server context and object chains when the object was marshaled.</summary>
|
||||
/// <returns>A chain of envoy sinks.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000847 RID: 2119
|
||||
// (get) Token: 0x060029C7 RID: 10695
|
||||
// (set) Token: 0x060029C8 RID: 10696
|
||||
IMessageSink EnvoySinks { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Defines the interface for unwrapping marshal-by-value objects from indirection.</summary>
|
||||
// Token: 0x0200043E RID: 1086
|
||||
[Guid("C460E2B4-E199-412a-8456-84DC3E4838C3")]
|
||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[ComVisible(true)]
|
||||
public interface IObjectHandle
|
||||
{
|
||||
/// <summary>Unwraps the object.</summary>
|
||||
/// <returns>The unwrapped object.</returns>
|
||||
// Token: 0x060029C9 RID: 10697
|
||||
object Unwrap();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Provides type information for an object.</summary>
|
||||
// Token: 0x0200043F RID: 1087
|
||||
[ComVisible(true)]
|
||||
public interface IRemotingTypeInfo
|
||||
{
|
||||
/// <summary>Gets or sets the fully qualified type name of the server object in a <see cref="T:System.Runtime.Remoting.ObjRef" />.</summary>
|
||||
/// <returns>The fully qualified type name of the server object in a <see cref="T:System.Runtime.Remoting.ObjRef" />.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x17000848 RID: 2120
|
||||
// (get) Token: 0x060029CA RID: 10698
|
||||
// (set) Token: 0x060029CB RID: 10699
|
||||
string TypeName { get; set; }
|
||||
|
||||
/// <summary>Checks whether the proxy that represents the specified object type can be cast to the type represented by the <see cref="T:System.Runtime.Remoting.IRemotingTypeInfo" /> interface.</summary>
|
||||
/// <returns>true if cast will succeed; otherwise, false.</returns>
|
||||
/// <param name="fromType">The type to cast to. </param>
|
||||
/// <param name="o">The object for which to check casting. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. </exception>
|
||||
// Token: 0x060029CC RID: 10700
|
||||
bool CanCastTo(Type fromType, object o);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
// Token: 0x02000440 RID: 1088
|
||||
internal abstract class Identity
|
||||
{
|
||||
// Token: 0x060029CD RID: 10701 RVA: 0x0008649C File Offset: 0x0008469C
|
||||
public Identity(string objectUri)
|
||||
{
|
||||
this._objectUri = objectUri;
|
||||
}
|
||||
|
||||
// Token: 0x060029CE RID: 10702
|
||||
public abstract ObjRef CreateObjRef(Type requestedType);
|
||||
|
||||
// Token: 0x17000849 RID: 2121
|
||||
// (get) Token: 0x060029CF RID: 10703 RVA: 0x000864AC File Offset: 0x000846AC
|
||||
public bool IsFromThisAppDomain
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._channelSink == null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700084A RID: 2122
|
||||
// (get) Token: 0x060029D0 RID: 10704 RVA: 0x000864B8 File Offset: 0x000846B8
|
||||
// (set) Token: 0x060029D1 RID: 10705 RVA: 0x000864C0 File Offset: 0x000846C0
|
||||
public IMessageSink ChannelSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._channelSink;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._channelSink = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700084B RID: 2123
|
||||
// (get) Token: 0x060029D2 RID: 10706 RVA: 0x000864CC File Offset: 0x000846CC
|
||||
public IMessageSink EnvoySink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._envoySink;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700084C RID: 2124
|
||||
// (get) Token: 0x060029D3 RID: 10707 RVA: 0x000864D4 File Offset: 0x000846D4
|
||||
// (set) Token: 0x060029D4 RID: 10708 RVA: 0x000864DC File Offset: 0x000846DC
|
||||
public string ObjectUri
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._objectUri;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._objectUri = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700084D RID: 2125
|
||||
// (get) Token: 0x060029D5 RID: 10709 RVA: 0x000864E8 File Offset: 0x000846E8
|
||||
public bool IsConnected
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._objectUri != null;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700084E RID: 2126
|
||||
// (get) Token: 0x060029D6 RID: 10710 RVA: 0x000864F8 File Offset: 0x000846F8
|
||||
// (set) Token: 0x060029D7 RID: 10711 RVA: 0x00086500 File Offset: 0x00084700
|
||||
public bool Disposed
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._disposed;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._disposed = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700084F RID: 2127
|
||||
// (get) Token: 0x060029D8 RID: 10712 RVA: 0x0008650C File Offset: 0x0008470C
|
||||
public DynamicPropertyCollection ClientDynamicProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._clientDynamicProperties == null)
|
||||
{
|
||||
this._clientDynamicProperties = new DynamicPropertyCollection();
|
||||
}
|
||||
return this._clientDynamicProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000850 RID: 2128
|
||||
// (get) Token: 0x060029D9 RID: 10713 RVA: 0x0008652C File Offset: 0x0008472C
|
||||
public DynamicPropertyCollection ServerDynamicProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._serverDynamicProperties == null)
|
||||
{
|
||||
this._serverDynamicProperties = new DynamicPropertyCollection();
|
||||
}
|
||||
return this._serverDynamicProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000851 RID: 2129
|
||||
// (get) Token: 0x060029DA RID: 10714 RVA: 0x0008654C File Offset: 0x0008474C
|
||||
public bool HasClientDynamicSinks
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._clientDynamicProperties != null && this._clientDynamicProperties.HasProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000852 RID: 2130
|
||||
// (get) Token: 0x060029DB RID: 10715 RVA: 0x00086568 File Offset: 0x00084768
|
||||
public bool HasServerDynamicSinks
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._serverDynamicProperties != null && this._serverDynamicProperties.HasProperties;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060029DC RID: 10716 RVA: 0x00086584 File Offset: 0x00084784
|
||||
public void NotifyClientDynamicSinks(bool start, IMessage req_msg, bool client_site, bool async)
|
||||
{
|
||||
if (this._clientDynamicProperties != null && this._clientDynamicProperties.HasProperties)
|
||||
{
|
||||
this._clientDynamicProperties.NotifyMessage(start, req_msg, client_site, async);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060029DD RID: 10717 RVA: 0x000865B4 File Offset: 0x000847B4
|
||||
public void NotifyServerDynamicSinks(bool start, IMessage req_msg, bool client_site, bool async)
|
||||
{
|
||||
if (this._serverDynamicProperties != null && this._serverDynamicProperties.HasProperties)
|
||||
{
|
||||
this._serverDynamicProperties.NotifyMessage(start, req_msg, client_site, async);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400100B RID: 4107
|
||||
protected string _objectUri;
|
||||
|
||||
// Token: 0x0400100C RID: 4108
|
||||
protected IMessageSink _channelSink;
|
||||
|
||||
// Token: 0x0400100D RID: 4109
|
||||
protected IMessageSink _envoySink;
|
||||
|
||||
// Token: 0x0400100E RID: 4110
|
||||
private DynamicPropertyCollection _clientDynamicProperties;
|
||||
|
||||
// Token: 0x0400100F RID: 4111
|
||||
private DynamicPropertyCollection _serverDynamicProperties;
|
||||
|
||||
// Token: 0x04001010 RID: 4112
|
||||
protected ObjRef _objRef;
|
||||
|
||||
// Token: 0x04001011 RID: 4113
|
||||
private bool _disposed;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Runtime.Remoting.Metadata;
|
||||
|
||||
namespace System.Runtime.Remoting
|
||||
{
|
||||
/// <summary>Defines utility methods for use by the .NET Framework remoting infrastructure.</summary>
|
||||
// Token: 0x02000442 RID: 1090
|
||||
[ComVisible(true)]
|
||||
public class InternalRemotingServices
|
||||
{
|
||||
/// <summary>Sends a message concerning a remoting channel to an unmanaged debugger. </summary>
|
||||
/// <param name="s">A string to place in the message.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060029E5 RID: 10725 RVA: 0x00086680 File Offset: 0x00084880
|
||||
[Conditional("_LOGGING")]
|
||||
public static void DebugOutChnl(string s)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Gets an appropriate SOAP-related attribute for the specified class member or method parameter. </summary>
|
||||
/// <param name="reflectionObject">A class member or method parameter.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060029E6 RID: 10726 RVA: 0x00086688 File Offset: 0x00084888
|
||||
public static SoapAttribute GetCachedSoapAttribute(object reflectionObject)
|
||||
{
|
||||
object syncRoot = InternalRemotingServices._soapAttributes.SyncRoot;
|
||||
SoapAttribute soapAttribute2;
|
||||
lock (syncRoot)
|
||||
{
|
||||
SoapAttribute soapAttribute = InternalRemotingServices._soapAttributes[reflectionObject] as SoapAttribute;
|
||||
if (soapAttribute != null)
|
||||
{
|
||||
soapAttribute2 = soapAttribute;
|
||||
}
|
||||
else
|
||||
{
|
||||
ICustomAttributeProvider customAttributeProvider = (ICustomAttributeProvider)reflectionObject;
|
||||
object[] customAttributes = customAttributeProvider.GetCustomAttributes(typeof(SoapAttribute), true);
|
||||
if (customAttributes.Length > 0)
|
||||
{
|
||||
soapAttribute = (SoapAttribute)customAttributes[0];
|
||||
}
|
||||
else if (reflectionObject is Type)
|
||||
{
|
||||
soapAttribute = new SoapTypeAttribute();
|
||||
}
|
||||
else if (reflectionObject is FieldInfo)
|
||||
{
|
||||
soapAttribute = new SoapFieldAttribute();
|
||||
}
|
||||
else if (reflectionObject is MethodBase)
|
||||
{
|
||||
soapAttribute = new SoapMethodAttribute();
|
||||
}
|
||||
else if (reflectionObject is ParameterInfo)
|
||||
{
|
||||
soapAttribute = new SoapParameterAttribute();
|
||||
}
|
||||
soapAttribute.SetReflectionObject(reflectionObject);
|
||||
InternalRemotingServices._soapAttributes[reflectionObject] = soapAttribute;
|
||||
soapAttribute2 = soapAttribute;
|
||||
}
|
||||
}
|
||||
return soapAttribute2;
|
||||
}
|
||||
|
||||
/// <summary>Instructs an internal debugger to check for a condition and display a message if the condition is false. </summary>
|
||||
/// <param name="condition">true to prevent a message from being displayed; otherwise, false.</param>
|
||||
/// <param name="message">The message to display if <paramref name="condition" /> is false.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060029E7 RID: 10727 RVA: 0x00086790 File Offset: 0x00084990
|
||||
[Conditional("_DEBUG")]
|
||||
public static void RemotingAssert(bool condition, string message)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Sends any number of messages concerning remoting channels to an internal debugger. </summary>
|
||||
/// <param name="messages">An array of type <see cref="T:System.Object" /> that contains any number of messages.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060029E8 RID: 10728 RVA: 0x00086798 File Offset: 0x00084998
|
||||
[Conditional("_LOGGING")]
|
||||
public static void RemotingTrace(params object[] messages)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Sets internal identifying information for a remoted server object for each method call from client to server.</summary>
|
||||
/// <param name="m">A <see cref="T:System.Runtime.Remoting.Messaging.MethodCall" /> that represents a method call on a remote object.</param>
|
||||
/// <param name="srvID">Internal identifying information for a remoted server object.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060029E9 RID: 10729 RVA: 0x000867A0 File Offset: 0x000849A0
|
||||
[CLSCompliant(false)]
|
||||
public static void SetServerIdentity(MethodCall m, object srvID)
|
||||
{
|
||||
Identity identity = srvID as Identity;
|
||||
if (identity == null)
|
||||
{
|
||||
throw new ArgumentException("srvID");
|
||||
}
|
||||
RemotingServices.SetMessageTargetIdentity(m, identity);
|
||||
}
|
||||
|
||||
// Token: 0x04001013 RID: 4115
|
||||
private static Hashtable _soapAttributes = new Hashtable();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
/// <summary>Provides a default implementation for a lifetime sponsor class.</summary>
|
||||
// Token: 0x020003CE RID: 974
|
||||
[ComVisible(true)]
|
||||
public class ClientSponsor : MarshalByRefObject, ISponsor
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" /> class with default values.</summary>
|
||||
// Token: 0x06002652 RID: 9810 RVA: 0x0007E610 File Offset: 0x0007C810
|
||||
public ClientSponsor()
|
||||
{
|
||||
this.renewal_time = new TimeSpan(0, 2, 0);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" /> class with the renewal time of the sponsored object.</summary>
|
||||
/// <param name="renewalTime">The <see cref="T:System.TimeSpan" /> by which to increase the lifetime of the sponsored objects when renewal is requested. </param>
|
||||
// Token: 0x06002653 RID: 9811 RVA: 0x0007E634 File Offset: 0x0007C834
|
||||
public ClientSponsor(TimeSpan renewalTime)
|
||||
{
|
||||
this.renewal_time = renewalTime;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the <see cref="T:System.TimeSpan" /> by which to increase the lifetime of the sponsored objects when renewal is requested.</summary>
|
||||
/// <returns>The <see cref="T:System.TimeSpan" /> by which to increase the lifetime of the sponsored objects when renewal is requested.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x1700072A RID: 1834
|
||||
// (get) Token: 0x06002654 RID: 9812 RVA: 0x0007E650 File Offset: 0x0007C850
|
||||
// (set) Token: 0x06002655 RID: 9813 RVA: 0x0007E658 File Offset: 0x0007C858
|
||||
public TimeSpan RenewalTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.renewal_time;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.renewal_time = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Empties the list objects registered with the current <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" />.</summary>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002656 RID: 9814 RVA: 0x0007E664 File Offset: 0x0007C864
|
||||
public void Close()
|
||||
{
|
||||
foreach (object obj in this.registered_objects.Values)
|
||||
{
|
||||
MarshalByRefObject marshalByRefObject = (MarshalByRefObject)obj;
|
||||
ILease lease = marshalByRefObject.GetLifetimeService() as ILease;
|
||||
lease.Unregister(this);
|
||||
}
|
||||
this.registered_objects.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Frees the resources of the current <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" /> before the garbage collector reclaims them.</summary>
|
||||
// Token: 0x06002657 RID: 9815 RVA: 0x0007E6F0 File Offset: 0x0007C8F0
|
||||
~ClientSponsor()
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" />, providing a lease for the current object.</summary>
|
||||
/// <returns>An <see cref="T:System.Runtime.Remoting.Lifetime.ILease" /> for the current object.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002658 RID: 9816 RVA: 0x0007E72C File Offset: 0x0007C92C
|
||||
public override object InitializeLifetimeService()
|
||||
{
|
||||
return base.InitializeLifetimeService();
|
||||
}
|
||||
|
||||
/// <summary>Registers the specified <see cref="T:System.MarshalByRefObject" /> for sponsorship.</summary>
|
||||
/// <returns>true if registration succeeded; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to register for sponsorship with the <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" />. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration, Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06002659 RID: 9817 RVA: 0x0007E734 File Offset: 0x0007C934
|
||||
public bool Register(MarshalByRefObject obj)
|
||||
{
|
||||
if (this.registered_objects.ContainsKey(obj))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ILease lease = obj.GetLifetimeService() as ILease;
|
||||
if (lease == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
lease.Register(this);
|
||||
this.registered_objects.Add(obj, obj);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Requests a sponsoring client to renew the lease for the specified object.</summary>
|
||||
/// <returns>The additional lease time for the specified object.</returns>
|
||||
/// <param name="lease">The lifetime lease of the object that requires lease renewal. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600265A RID: 9818 RVA: 0x0007E780 File Offset: 0x0007C980
|
||||
public TimeSpan Renewal(ILease lease)
|
||||
{
|
||||
return this.renewal_time;
|
||||
}
|
||||
|
||||
/// <summary>Unregisters the specified <see cref="T:System.MarshalByRefObject" /> from the list of objects sponsored by the current <see cref="T:System.Runtime.Remoting.Lifetime.ClientSponsor" />.</summary>
|
||||
/// <param name="obj">The object to unregister. </param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600265B RID: 9819 RVA: 0x0007E788 File Offset: 0x0007C988
|
||||
public void Unregister(MarshalByRefObject obj)
|
||||
{
|
||||
if (!this.registered_objects.ContainsKey(obj))
|
||||
{
|
||||
return;
|
||||
}
|
||||
ILease lease = obj.GetLifetimeService() as ILease;
|
||||
lease.Unregister(this);
|
||||
this.registered_objects.Remove(obj);
|
||||
}
|
||||
|
||||
// Token: 0x04000EF3 RID: 3827
|
||||
private TimeSpan renewal_time;
|
||||
|
||||
// Token: 0x04000EF4 RID: 3828
|
||||
private Hashtable registered_objects = new Hashtable();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
/// <summary>Defines a lifetime lease object that is used by the remoting lifetime service.</summary>
|
||||
// Token: 0x020003CF RID: 975
|
||||
[ComVisible(true)]
|
||||
public interface ILease
|
||||
{
|
||||
/// <summary>Gets the amount of time remaining on the lease.</summary>
|
||||
/// <returns>The amount of time remaining on the lease.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x1700072B RID: 1835
|
||||
// (get) Token: 0x0600265C RID: 9820
|
||||
TimeSpan CurrentLeaseTime { get; }
|
||||
|
||||
/// <summary>Gets the current <see cref="T:System.Runtime.Remoting.Lifetime.LeaseState" /> of the lease.</summary>
|
||||
/// <returns>The current <see cref="T:System.Runtime.Remoting.Lifetime.LeaseState" /> of the lease.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x1700072C RID: 1836
|
||||
// (get) Token: 0x0600265D RID: 9821
|
||||
LeaseState CurrentState { get; }
|
||||
|
||||
/// <summary>Gets or sets the initial time for the lease.</summary>
|
||||
/// <returns>The initial time for the lease.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x1700072D RID: 1837
|
||||
// (get) Token: 0x0600265E RID: 9822
|
||||
// (set) Token: 0x0600265F RID: 9823
|
||||
TimeSpan InitialLeaseTime { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the amount of time by which a call to the remote object renews the <see cref="P:System.Runtime.Remoting.Lifetime.ILease.CurrentLeaseTime" />.</summary>
|
||||
/// <returns>The amount of time by which a call to the remote object renews the <see cref="P:System.Runtime.Remoting.Lifetime.ILease.CurrentLeaseTime" />.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x1700072E RID: 1838
|
||||
// (get) Token: 0x06002660 RID: 9824
|
||||
// (set) Token: 0x06002661 RID: 9825
|
||||
TimeSpan RenewOnCallTime { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the amount of time to wait for a sponsor to return with a lease renewal time.</summary>
|
||||
/// <returns>The amount of time to wait for a sponsor to return with a lease renewal time.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x1700072F RID: 1839
|
||||
// (get) Token: 0x06002662 RID: 9826
|
||||
// (set) Token: 0x06002663 RID: 9827
|
||||
TimeSpan SponsorshipTimeout { get; set; }
|
||||
|
||||
/// <summary>Registers a sponsor for the lease without renewing the lease.</summary>
|
||||
/// <param name="obj">The callback object of the sponsor. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x06002664 RID: 9828
|
||||
void Register(ISponsor obj);
|
||||
|
||||
/// <summary>Registers a sponsor for the lease, and renews it by the specified <see cref="T:System.TimeSpan" />.</summary>
|
||||
/// <param name="obj">The callback object of the sponsor. </param>
|
||||
/// <param name="renewalTime">The length of time to renew the lease by. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. </exception>
|
||||
// Token: 0x06002665 RID: 9829
|
||||
void Register(ISponsor obj, TimeSpan renewalTime);
|
||||
|
||||
/// <summary>Renews a lease for the specified time.</summary>
|
||||
/// <returns>The new expiration time of the lease.</returns>
|
||||
/// <param name="renewalTime">The length of time to renew the lease by. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x06002666 RID: 9830
|
||||
TimeSpan Renew(TimeSpan renewalTime);
|
||||
|
||||
/// <summary>Removes a sponsor from the sponsor list.</summary>
|
||||
/// <param name="obj">The lease sponsor to unregister. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x06002667 RID: 9831
|
||||
void Unregister(ISponsor obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
/// <summary>Indicates that the implementer wants to be a lifetime lease sponsor.</summary>
|
||||
// Token: 0x020003D0 RID: 976
|
||||
[ComVisible(true)]
|
||||
public interface ISponsor
|
||||
{
|
||||
/// <summary>Requests a sponsoring client to renew the lease for the specified object.</summary>
|
||||
/// <returns>The additional lease time for the specified object.</returns>
|
||||
/// <param name="lease">The lifetime lease of the object that requires lease renewal. </param>
|
||||
/// <exception cref="T:System.Security.SecurityException">The immediate caller makes the call through a reference to the interface and 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: 0x06002668 RID: 9832
|
||||
TimeSpan Renewal(ILease lease);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
// Token: 0x020003D1 RID: 977
|
||||
internal class Lease : MarshalByRefObject, ILease
|
||||
{
|
||||
// Token: 0x06002669 RID: 9833 RVA: 0x0007E7C8 File Offset: 0x0007C9C8
|
||||
public Lease()
|
||||
{
|
||||
this._currentState = LeaseState.Initial;
|
||||
this._initialLeaseTime = LifetimeServices.LeaseTime;
|
||||
this._renewOnCallTime = LifetimeServices.RenewOnCallTime;
|
||||
this._sponsorshipTimeout = LifetimeServices.SponsorshipTimeout;
|
||||
this._leaseExpireTime = DateTime.Now + this._initialLeaseTime;
|
||||
}
|
||||
|
||||
// Token: 0x17000730 RID: 1840
|
||||
// (get) Token: 0x0600266A RID: 9834 RVA: 0x0007E81C File Offset: 0x0007CA1C
|
||||
public TimeSpan CurrentLeaseTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._leaseExpireTime - DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000731 RID: 1841
|
||||
// (get) Token: 0x0600266B RID: 9835 RVA: 0x0007E830 File Offset: 0x0007CA30
|
||||
public LeaseState CurrentState
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._currentState;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600266C RID: 9836 RVA: 0x0007E838 File Offset: 0x0007CA38
|
||||
public void Activate()
|
||||
{
|
||||
this._currentState = LeaseState.Active;
|
||||
}
|
||||
|
||||
// Token: 0x17000732 RID: 1842
|
||||
// (get) Token: 0x0600266D RID: 9837 RVA: 0x0007E844 File Offset: 0x0007CA44
|
||||
// (set) Token: 0x0600266E RID: 9838 RVA: 0x0007E84C File Offset: 0x0007CA4C
|
||||
public TimeSpan InitialLeaseTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._initialLeaseTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this._currentState != LeaseState.Initial)
|
||||
{
|
||||
throw new RemotingException("InitialLeaseTime property can only be set when the lease is in initial state; state is " + this._currentState + ".");
|
||||
}
|
||||
this._initialLeaseTime = value;
|
||||
this._leaseExpireTime = DateTime.Now + this._initialLeaseTime;
|
||||
if (value == TimeSpan.Zero)
|
||||
{
|
||||
this._currentState = LeaseState.Null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000733 RID: 1843
|
||||
// (get) Token: 0x0600266F RID: 9839 RVA: 0x0007E8BC File Offset: 0x0007CABC
|
||||
// (set) Token: 0x06002670 RID: 9840 RVA: 0x0007E8C4 File Offset: 0x0007CAC4
|
||||
public TimeSpan RenewOnCallTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._renewOnCallTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this._currentState != LeaseState.Initial)
|
||||
{
|
||||
throw new RemotingException("RenewOnCallTime property can only be set when the lease is in initial state; state is " + this._currentState + ".");
|
||||
}
|
||||
this._renewOnCallTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000734 RID: 1844
|
||||
// (get) Token: 0x06002671 RID: 9841 RVA: 0x0007E8FC File Offset: 0x0007CAFC
|
||||
// (set) Token: 0x06002672 RID: 9842 RVA: 0x0007E904 File Offset: 0x0007CB04
|
||||
public TimeSpan SponsorshipTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._sponsorshipTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this._currentState != LeaseState.Initial)
|
||||
{
|
||||
throw new RemotingException("SponsorshipTimeout property can only be set when the lease is in initial state; state is " + this._currentState + ".");
|
||||
}
|
||||
this._sponsorshipTimeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002673 RID: 9843 RVA: 0x0007E93C File Offset: 0x0007CB3C
|
||||
public void Register(ISponsor obj)
|
||||
{
|
||||
this.Register(obj, TimeSpan.Zero);
|
||||
}
|
||||
|
||||
// Token: 0x06002674 RID: 9844 RVA: 0x0007E94C File Offset: 0x0007CB4C
|
||||
public void Register(ISponsor obj, TimeSpan renewalTime)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this._sponsors == null)
|
||||
{
|
||||
this._sponsors = new ArrayList();
|
||||
}
|
||||
this._sponsors.Add(obj);
|
||||
}
|
||||
if (renewalTime != TimeSpan.Zero)
|
||||
{
|
||||
this.Renew(renewalTime);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002675 RID: 9845 RVA: 0x0007E9C4 File Offset: 0x0007CBC4
|
||||
public TimeSpan Renew(TimeSpan renewalTime)
|
||||
{
|
||||
DateTime dateTime = DateTime.Now + renewalTime;
|
||||
if (dateTime > this._leaseExpireTime)
|
||||
{
|
||||
this._leaseExpireTime = dateTime;
|
||||
}
|
||||
return this.CurrentLeaseTime;
|
||||
}
|
||||
|
||||
// Token: 0x06002676 RID: 9846 RVA: 0x0007E9FC File Offset: 0x0007CBFC
|
||||
public void Unregister(ISponsor obj)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this._sponsors != null)
|
||||
{
|
||||
for (int i = 0; i < this._sponsors.Count; i++)
|
||||
{
|
||||
if (object.ReferenceEquals(this._sponsors[i], obj))
|
||||
{
|
||||
this._sponsors.RemoveAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002677 RID: 9847 RVA: 0x0007EA90 File Offset: 0x0007CC90
|
||||
internal void UpdateState()
|
||||
{
|
||||
if (this._currentState != LeaseState.Active)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.CurrentLeaseTime > TimeSpan.Zero)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this._sponsors != null)
|
||||
{
|
||||
this._currentState = LeaseState.Renewing;
|
||||
lock (this)
|
||||
{
|
||||
this._renewingSponsors = new Queue(this._sponsors);
|
||||
}
|
||||
this.CheckNextSponsor();
|
||||
}
|
||||
else
|
||||
{
|
||||
this._currentState = LeaseState.Expired;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002678 RID: 9848 RVA: 0x0007EB28 File Offset: 0x0007CD28
|
||||
private void CheckNextSponsor()
|
||||
{
|
||||
if (this._renewingSponsors.Count == 0)
|
||||
{
|
||||
this._currentState = LeaseState.Expired;
|
||||
this._renewingSponsors = null;
|
||||
return;
|
||||
}
|
||||
ISponsor sponsor = (ISponsor)this._renewingSponsors.Peek();
|
||||
this._renewalDelegate = new Lease.RenewalDelegate(sponsor.Renewal);
|
||||
IAsyncResult asyncResult = this._renewalDelegate.BeginInvoke(this, null, null);
|
||||
ThreadPool.RegisterWaitForSingleObject(asyncResult.AsyncWaitHandle, new WaitOrTimerCallback(this.ProcessSponsorResponse), asyncResult, this._sponsorshipTimeout, true);
|
||||
}
|
||||
|
||||
// Token: 0x06002679 RID: 9849 RVA: 0x0007EBA8 File Offset: 0x0007CDA8
|
||||
private void ProcessSponsorResponse(object state, bool timedOut)
|
||||
{
|
||||
if (!timedOut)
|
||||
{
|
||||
try
|
||||
{
|
||||
IAsyncResult asyncResult = (IAsyncResult)state;
|
||||
TimeSpan timeSpan = this._renewalDelegate.EndInvoke(asyncResult);
|
||||
if (timeSpan != TimeSpan.Zero)
|
||||
{
|
||||
this.Renew(timeSpan);
|
||||
this._currentState = LeaseState.Active;
|
||||
this._renewingSponsors = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
this.Unregister((ISponsor)this._renewingSponsors.Dequeue());
|
||||
this.CheckNextSponsor();
|
||||
}
|
||||
|
||||
// Token: 0x04000EF5 RID: 3829
|
||||
private DateTime _leaseExpireTime;
|
||||
|
||||
// Token: 0x04000EF6 RID: 3830
|
||||
private LeaseState _currentState;
|
||||
|
||||
// Token: 0x04000EF7 RID: 3831
|
||||
private TimeSpan _initialLeaseTime;
|
||||
|
||||
// Token: 0x04000EF8 RID: 3832
|
||||
private TimeSpan _renewOnCallTime;
|
||||
|
||||
// Token: 0x04000EF9 RID: 3833
|
||||
private TimeSpan _sponsorshipTimeout;
|
||||
|
||||
// Token: 0x04000EFA RID: 3834
|
||||
private ArrayList _sponsors;
|
||||
|
||||
// Token: 0x04000EFB RID: 3835
|
||||
private Queue _renewingSponsors;
|
||||
|
||||
// Token: 0x04000EFC RID: 3836
|
||||
private Lease.RenewalDelegate _renewalDelegate;
|
||||
|
||||
// Token: 0x020006CF RID: 1743
|
||||
// (Invoke) Token: 0x060041C4 RID: 16836
|
||||
private delegate TimeSpan RenewalDelegate(ILease lease);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
// Token: 0x020003D2 RID: 978
|
||||
internal class LeaseManager
|
||||
{
|
||||
// Token: 0x0600267B RID: 9851 RVA: 0x0007EC54 File Offset: 0x0007CE54
|
||||
public void SetPollTime(TimeSpan timeSpan)
|
||||
{
|
||||
object syncRoot = this._objects.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
if (this._timer != null)
|
||||
{
|
||||
this._timer.Change(timeSpan, timeSpan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600267C RID: 9852 RVA: 0x0007ECB4 File Offset: 0x0007CEB4
|
||||
public void TrackLifetime(ServerIdentity identity)
|
||||
{
|
||||
object syncRoot = this._objects.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
identity.Lease.Activate();
|
||||
this._objects.Add(identity);
|
||||
if (this._timer == null)
|
||||
{
|
||||
this.StartManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600267D RID: 9853 RVA: 0x0007ED24 File Offset: 0x0007CF24
|
||||
public void StopTrackingLifetime(ServerIdentity identity)
|
||||
{
|
||||
object syncRoot = this._objects.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this._objects.Remove(identity);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600267E RID: 9854 RVA: 0x0007ED78 File Offset: 0x0007CF78
|
||||
public void StartManager()
|
||||
{
|
||||
this._timer = new Timer(new TimerCallback(this.ManageLeases), null, LifetimeServices.LeaseManagerPollTime, LifetimeServices.LeaseManagerPollTime);
|
||||
}
|
||||
|
||||
// Token: 0x0600267F RID: 9855 RVA: 0x0007EDA8 File Offset: 0x0007CFA8
|
||||
public void StopManager()
|
||||
{
|
||||
Timer timer = this._timer;
|
||||
this._timer = null;
|
||||
timer.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x06002680 RID: 9856 RVA: 0x0007EDCC File Offset: 0x0007CFCC
|
||||
public void ManageLeases(object state)
|
||||
{
|
||||
object syncRoot = this._objects.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
int i = 0;
|
||||
while (i < this._objects.Count)
|
||||
{
|
||||
ServerIdentity serverIdentity = (ServerIdentity)this._objects[i];
|
||||
serverIdentity.Lease.UpdateState();
|
||||
if (serverIdentity.Lease.CurrentState == LeaseState.Expired)
|
||||
{
|
||||
this._objects.RemoveAt(i);
|
||||
serverIdentity.OnLifetimeExpired();
|
||||
}
|
||||
else
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (this._objects.Count == 0)
|
||||
{
|
||||
this.StopManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EFD RID: 3837
|
||||
private ArrayList _objects = new ArrayList();
|
||||
|
||||
// Token: 0x04000EFE RID: 3838
|
||||
private Timer _timer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
// Token: 0x020003D3 RID: 979
|
||||
internal class LeaseSink : IMessageSink
|
||||
{
|
||||
// Token: 0x06002681 RID: 9857 RVA: 0x0007EE8C File Offset: 0x0007D08C
|
||||
public LeaseSink(IMessageSink nextSink)
|
||||
{
|
||||
this._nextSink = nextSink;
|
||||
}
|
||||
|
||||
// Token: 0x06002682 RID: 9858 RVA: 0x0007EE9C File Offset: 0x0007D09C
|
||||
public IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
this.RenewLease(msg);
|
||||
return this._nextSink.SyncProcessMessage(msg);
|
||||
}
|
||||
|
||||
// Token: 0x06002683 RID: 9859 RVA: 0x0007EEB4 File Offset: 0x0007D0B4
|
||||
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
this.RenewLease(msg);
|
||||
return this._nextSink.AsyncProcessMessage(msg, replySink);
|
||||
}
|
||||
|
||||
// Token: 0x06002684 RID: 9860 RVA: 0x0007EECC File Offset: 0x0007D0CC
|
||||
private void RenewLease(IMessage msg)
|
||||
{
|
||||
ServerIdentity serverIdentity = (ServerIdentity)RemotingServices.GetMessageTargetIdentity(msg);
|
||||
ILease lease = serverIdentity.Lease;
|
||||
if (lease != null && lease.CurrentLeaseTime < lease.RenewOnCallTime)
|
||||
{
|
||||
lease.Renew(lease.RenewOnCallTime);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000735 RID: 1845
|
||||
// (get) Token: 0x06002685 RID: 9861 RVA: 0x0007EF18 File Offset: 0x0007D118
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._nextSink;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000EFF RID: 3839
|
||||
private IMessageSink _nextSink;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
/// <summary>Indicates the possible lease states of a lifetime lease.</summary>
|
||||
// Token: 0x020003D4 RID: 980
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public enum LeaseState
|
||||
{
|
||||
/// <summary>The lease is not initialized.</summary>
|
||||
// Token: 0x04000F01 RID: 3841
|
||||
Null,
|
||||
/// <summary>The lease has been created, but is not yet active.</summary>
|
||||
// Token: 0x04000F02 RID: 3842
|
||||
Initial,
|
||||
/// <summary>The lease is active and has not expired.</summary>
|
||||
// Token: 0x04000F03 RID: 3843
|
||||
Active,
|
||||
/// <summary>The lease has expired and is seeking sponsorship.</summary>
|
||||
// Token: 0x04000F04 RID: 3844
|
||||
Renewing,
|
||||
/// <summary>The lease has expired and cannot be renewed.</summary>
|
||||
// Token: 0x04000F05 RID: 3845
|
||||
Expired
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Runtime.Remoting.Lifetime
|
||||
{
|
||||
/// <summary>Controls the.NET remoting lifetime services.</summary>
|
||||
// Token: 0x020003D5 RID: 981
|
||||
[ComVisible(true)]
|
||||
public sealed class LifetimeServices
|
||||
{
|
||||
/// <summary>Gets or sets the time interval between each activation of the lease manager to clean up expired leases.</summary>
|
||||
/// <returns>The default amount of time the lease manager sleeps after checking for expired leases.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. This exception is thrown only when setting the property value. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration, Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000736 RID: 1846
|
||||
// (get) Token: 0x06002688 RID: 9864 RVA: 0x0007EF8C File Offset: 0x0007D18C
|
||||
// (set) Token: 0x06002689 RID: 9865 RVA: 0x0007EF94 File Offset: 0x0007D194
|
||||
public static TimeSpan LeaseManagerPollTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return LifetimeServices._leaseManagerPollTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
LifetimeServices._leaseManagerPollTime = value;
|
||||
LifetimeServices._leaseManager.SetPollTime(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the initial lease time span for an <see cref="T:System.AppDomain" />.</summary>
|
||||
/// <returns>The initial lease <see cref="T:System.TimeSpan" /> for objects that can have leases in the <see cref="T:System.AppDomain" />.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. This exception is thrown only when setting the property value. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration, Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000737 RID: 1847
|
||||
// (get) Token: 0x0600268A RID: 9866 RVA: 0x0007EFA8 File Offset: 0x0007D1A8
|
||||
// (set) Token: 0x0600268B RID: 9867 RVA: 0x0007EFB0 File Offset: 0x0007D1B0
|
||||
public static TimeSpan LeaseTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return LifetimeServices._leaseTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
LifetimeServices._leaseTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the amount of time by which the lease is extended every time a call comes in on the server object.</summary>
|
||||
/// <returns>The <see cref="T:System.TimeSpan" /> by which a lifetime lease in the current <see cref="T:System.AppDomain" /> is extended after each call.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. This exception is thrown only when setting the property value. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration, Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000738 RID: 1848
|
||||
// (get) Token: 0x0600268C RID: 9868 RVA: 0x0007EFB8 File Offset: 0x0007D1B8
|
||||
// (set) Token: 0x0600268D RID: 9869 RVA: 0x0007EFC0 File Offset: 0x0007D1C0
|
||||
public static TimeSpan RenewOnCallTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return LifetimeServices._renewOnCallTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
LifetimeServices._renewOnCallTime = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the amount of time the lease manager waits for a sponsor to return with a lease renewal time.</summary>
|
||||
/// <returns>The initial sponsorship time-out.</returns>
|
||||
/// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. This exception is thrown only when setting the property value. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration, Infrastructure" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000739 RID: 1849
|
||||
// (get) Token: 0x0600268E RID: 9870 RVA: 0x0007EFC8 File Offset: 0x0007D1C8
|
||||
// (set) Token: 0x0600268F RID: 9871 RVA: 0x0007EFD0 File Offset: 0x0007D1D0
|
||||
public static TimeSpan SponsorshipTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return LifetimeServices._sponsorshipTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
LifetimeServices._sponsorshipTimeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002690 RID: 9872 RVA: 0x0007EFD8 File Offset: 0x0007D1D8
|
||||
internal static void TrackLifetime(ServerIdentity identity)
|
||||
{
|
||||
LifetimeServices._leaseManager.TrackLifetime(identity);
|
||||
}
|
||||
|
||||
// Token: 0x06002691 RID: 9873 RVA: 0x0007EFE8 File Offset: 0x0007D1E8
|
||||
internal static void StopTrackingLifetime(ServerIdentity identity)
|
||||
{
|
||||
LifetimeServices._leaseManager.StopTrackingLifetime(identity);
|
||||
}
|
||||
|
||||
// Token: 0x04000F06 RID: 3846
|
||||
private static TimeSpan _leaseManagerPollTime = TimeSpan.FromSeconds(10.0);
|
||||
|
||||
// Token: 0x04000F07 RID: 3847
|
||||
private static TimeSpan _leaseTime = TimeSpan.FromMinutes(5.0);
|
||||
|
||||
// Token: 0x04000F08 RID: 3848
|
||||
private static TimeSpan _renewOnCallTime = TimeSpan.FromMinutes(2.0);
|
||||
|
||||
// Token: 0x04000F09 RID: 3849
|
||||
private static TimeSpan _sponsorshipTimeout = TimeSpan.FromMinutes(2.0);
|
||||
|
||||
// Token: 0x04000F0A RID: 3850
|
||||
private static LeaseManager _leaseManager = new LeaseManager();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Runtime.Remoting.Messaging
|
||||
{
|
||||
// Token: 0x020003D7 RID: 983
|
||||
internal class ArgInfo
|
||||
{
|
||||
// Token: 0x06002692 RID: 9874 RVA: 0x0007EFF8 File Offset: 0x0007D1F8
|
||||
public ArgInfo(MethodBase method, ArgInfoType type)
|
||||
{
|
||||
this._method = method;
|
||||
ParameterInfo[] parameters = this._method.GetParameters();
|
||||
this._paramMap = new int[parameters.Length];
|
||||
this._inoutArgCount = 0;
|
||||
if (type == ArgInfoType.In)
|
||||
{
|
||||
for (int i = 0; i < parameters.Length; i++)
|
||||
{
|
||||
if (!parameters[i].ParameterType.IsByRef)
|
||||
{
|
||||
this._paramMap[this._inoutArgCount++] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < parameters.Length; j++)
|
||||
{
|
||||
if (parameters[j].ParameterType.IsByRef || parameters[j].IsOut)
|
||||
{
|
||||
this._paramMap[this._inoutArgCount++] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06002693 RID: 9875 RVA: 0x0007F0CC File Offset: 0x0007D2CC
|
||||
public int GetInOutArgIndex(int inoutArgNum)
|
||||
{
|
||||
return this._paramMap[inoutArgNum];
|
||||
}
|
||||
|
||||
// Token: 0x06002694 RID: 9876 RVA: 0x0007F0D8 File Offset: 0x0007D2D8
|
||||
public virtual string GetInOutArgName(int index)
|
||||
{
|
||||
return this._method.GetParameters()[this._paramMap[index]].Name;
|
||||
}
|
||||
|
||||
// Token: 0x06002695 RID: 9877 RVA: 0x0007F0F4 File Offset: 0x0007D2F4
|
||||
public int GetInOutArgCount()
|
||||
{
|
||||
return this._inoutArgCount;
|
||||
}
|
||||
|
||||
// Token: 0x06002696 RID: 9878 RVA: 0x0007F0FC File Offset: 0x0007D2FC
|
||||
public object[] GetInOutArgs(object[] args)
|
||||
{
|
||||
object[] array = new object[this._inoutArgCount];
|
||||
for (int i = 0; i < this._inoutArgCount; i++)
|
||||
{
|
||||
array[i] = args[this._paramMap[i]];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x04000F0E RID: 3854
|
||||
private int[] _paramMap;
|
||||
|
||||
// Token: 0x04000F0F RID: 3855
|
||||
private int _inoutArgCount;
|
||||
|
||||
// Token: 0x04000F10 RID: 3856
|
||||
private MethodBase _method;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace System.Runtime.Remoting.Messaging
|
||||
{
|
||||
// Token: 0x020003D6 RID: 982
|
||||
internal enum ArgInfoType : byte
|
||||
{
|
||||
// Token: 0x04000F0C RID: 3852
|
||||
In,
|
||||
// Token: 0x04000F0D RID: 3853
|
||||
Out
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Runtime.Remoting.Messaging
|
||||
{
|
||||
/// <summary>Encapsulates the results of an asynchronous operation on a delegate.</summary>
|
||||
// Token: 0x020003D8 RID: 984
|
||||
[ComVisible(true)]
|
||||
public class AsyncResult : IAsyncResult, IMessageSink
|
||||
{
|
||||
// Token: 0x06002697 RID: 9879 RVA: 0x0007F13C File Offset: 0x0007D33C
|
||||
internal AsyncResult()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets the object provided as the last parameter of a BeginInvoke method call.</summary>
|
||||
/// <returns>The object provided as the last parameter of a BeginInvoke method call.</returns>
|
||||
// Token: 0x1700073A RID: 1850
|
||||
// (get) Token: 0x06002698 RID: 9880 RVA: 0x0007F144 File Offset: 0x0007D344
|
||||
public virtual object AsyncState
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.async_state;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Threading.WaitHandle" /> that encapsulates Win32 synchronization handles, and allows the implementation of various synchronization schemes.</summary>
|
||||
/// <returns>A <see cref="T:System.Threading.WaitHandle" /> that encapsulates Win32 synchronization handles, and allows the implementation of various synchronization schemes.</returns>
|
||||
// Token: 0x1700073B RID: 1851
|
||||
// (get) Token: 0x06002699 RID: 9881 RVA: 0x0007F14C File Offset: 0x0007D34C
|
||||
public virtual WaitHandle AsyncWaitHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
WaitHandle waitHandle;
|
||||
lock (this)
|
||||
{
|
||||
if (this.handle == null)
|
||||
{
|
||||
this.handle = new ManualResetEvent(this.completed);
|
||||
}
|
||||
waitHandle = this.handle;
|
||||
}
|
||||
return waitHandle;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the BeginInvoke call completed synchronously.</summary>
|
||||
/// <returns>true if the BeginInvoke call completed synchronously; otherwise, false.</returns>
|
||||
// Token: 0x1700073C RID: 1852
|
||||
// (get) Token: 0x0600269A RID: 9882 RVA: 0x0007F1B4 File Offset: 0x0007D3B4
|
||||
public virtual bool CompletedSynchronously
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.sync_completed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the server has completed the call.</summary>
|
||||
/// <returns>true after the server has completed the call; otherwise, false.</returns>
|
||||
// Token: 0x1700073D RID: 1853
|
||||
// (get) Token: 0x0600269B RID: 9883 RVA: 0x0007F1BC File Offset: 0x0007D3BC
|
||||
public virtual bool IsCompleted
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.completed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether EndInvoke has been called on the current <see cref="T:System.Runtime.Remoting.Messaging.AsyncResult" />.</summary>
|
||||
/// <returns>true if EndInvoke has been called on the current <see cref="T:System.Runtime.Remoting.Messaging.AsyncResult" />; otherwise, false.</returns>
|
||||
// Token: 0x1700073E RID: 1854
|
||||
// (get) Token: 0x0600269C RID: 9884 RVA: 0x0007F1C4 File Offset: 0x0007D3C4
|
||||
// (set) Token: 0x0600269D RID: 9885 RVA: 0x0007F1CC File Offset: 0x0007D3CC
|
||||
public bool EndInvokeCalled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.endinvoke_called;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.endinvoke_called = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the delegate object on which the asynchronous call was invoked.</summary>
|
||||
/// <returns>The delegate object on which the asynchronous call was invoked.</returns>
|
||||
// Token: 0x1700073F RID: 1855
|
||||
// (get) Token: 0x0600269E RID: 9886 RVA: 0x0007F1D8 File Offset: 0x0007D3D8
|
||||
public virtual object AsyncDelegate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.async_delegate;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the next message sink in the sink chain.</summary>
|
||||
/// <returns>An <see cref="T:System.Runtime.Remoting.Messaging.IMessageSink" /> interface that represents the next message sink in the sink chain.</returns>
|
||||
// Token: 0x17000740 RID: 1856
|
||||
// (get) Token: 0x0600269F RID: 9887 RVA: 0x0007F1E0 File Offset: 0x0007D3E0
|
||||
public IMessageSink NextSink
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Remoting.Messaging.IMessageSink" /> interface.</summary>
|
||||
/// <returns>No value is returned.</returns>
|
||||
/// <param name="msg">The request <see cref="T:System.Runtime.Remoting.Messaging.IMessage" /> interface. </param>
|
||||
/// <param name="replySink">The response <see cref="T:System.Runtime.Remoting.Messaging.IMessageSink" /> interface. </param>
|
||||
// Token: 0x060026A0 RID: 9888 RVA: 0x0007F1E4 File Offset: 0x0007D3E4
|
||||
public virtual IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Gets the response message for the asynchronous call.</summary>
|
||||
/// <returns>A remoting message that should represent a response to a method call on a remote object.</returns>
|
||||
// Token: 0x060026A1 RID: 9889 RVA: 0x0007F1EC File Offset: 0x0007D3EC
|
||||
public virtual IMessage GetReplyMessage()
|
||||
{
|
||||
return this.reply_message;
|
||||
}
|
||||
|
||||
/// <summary>Sets an <see cref="T:System.Runtime.Remoting.Messaging.IMessageCtrl" /> for the current remote method call, which provides a way to control asynchronous messages after they have been dispatched.</summary>
|
||||
/// <param name="mc">The <see cref="T:System.Runtime.Remoting.Messaging.IMessageCtrl" /> for the current remote method call. </param>
|
||||
// Token: 0x060026A2 RID: 9890 RVA: 0x0007F1F4 File Offset: 0x0007D3F4
|
||||
public virtual void SetMessageCtrl(IMessageCtrl mc)
|
||||
{
|
||||
this.message_ctrl = mc;
|
||||
}
|
||||
|
||||
// Token: 0x060026A3 RID: 9891 RVA: 0x0007F200 File Offset: 0x0007D400
|
||||
internal void SetCompletedSynchronously(bool completed)
|
||||
{
|
||||
this.sync_completed = completed;
|
||||
}
|
||||
|
||||
// Token: 0x060026A4 RID: 9892 RVA: 0x0007F20C File Offset: 0x0007D40C
|
||||
internal IMessage EndInvoke()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (this.completed)
|
||||
{
|
||||
return this.reply_message;
|
||||
}
|
||||
}
|
||||
this.AsyncWaitHandle.WaitOne();
|
||||
return this.reply_message;
|
||||
}
|
||||
|
||||
/// <summary>Synchronously processes a response message returned by a method call on a remote object.</summary>
|
||||
/// <returns>Returns null.</returns>
|
||||
/// <param name="msg">A response message to a method call on a remote object.</param>
|
||||
// Token: 0x060026A5 RID: 9893 RVA: 0x0007F274 File Offset: 0x0007D474
|
||||
public virtual IMessage SyncProcessMessage(IMessage msg)
|
||||
{
|
||||
this.reply_message = msg;
|
||||
lock (this)
|
||||
{
|
||||
this.completed = true;
|
||||
if (this.handle != null)
|
||||
{
|
||||
((ManualResetEvent)this.AsyncWaitHandle).Set();
|
||||
}
|
||||
}
|
||||
if (this.async_callback != null)
|
||||
{
|
||||
AsyncCallback asyncCallback = (AsyncCallback)this.async_callback;
|
||||
asyncCallback(this);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x17000741 RID: 1857
|
||||
// (get) Token: 0x060026A6 RID: 9894 RVA: 0x0007F2FC File Offset: 0x0007D4FC
|
||||
// (set) Token: 0x060026A7 RID: 9895 RVA: 0x0007F304 File Offset: 0x0007D504
|
||||
internal MonoMethodMessage CallMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.call_message;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.call_message = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000F11 RID: 3857
|
||||
private object async_state;
|
||||
|
||||
// Token: 0x04000F12 RID: 3858
|
||||
private WaitHandle handle;
|
||||
|
||||
// Token: 0x04000F13 RID: 3859
|
||||
private object async_delegate;
|
||||
|
||||
// Token: 0x04000F14 RID: 3860
|
||||
private IntPtr data;
|
||||
|
||||
// Token: 0x04000F15 RID: 3861
|
||||
private object object_data;
|
||||
|
||||
// Token: 0x04000F16 RID: 3862
|
||||
private bool sync_completed;
|
||||
|
||||
// Token: 0x04000F17 RID: 3863
|
||||
private bool completed;
|
||||
|
||||
// Token: 0x04000F18 RID: 3864
|
||||
private bool endinvoke_called;
|
||||
|
||||
// Token: 0x04000F19 RID: 3865
|
||||
private object async_callback;
|
||||
|
||||
// Token: 0x04000F1A RID: 3866
|
||||
private ExecutionContext current;
|
||||
|
||||
// Token: 0x04000F1B RID: 3867
|
||||
private ExecutionContext original;
|
||||
|
||||
// Token: 0x04000F1C RID: 3868
|
||||
private int gchandle;
|
||||
|
||||
// Token: 0x04000F1D RID: 3869
|
||||
private MonoMethodMessage call_message;
|
||||
|
||||
// Token: 0x04000F1E RID: 3870
|
||||
private IMessageCtrl message_ctrl;
|
||||
|
||||
// Token: 0x04000F1F RID: 3871
|
||||
private IMessage reply_message;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user