using System; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.Serialization; namespace System.Runtime.Remoting.Messaging { /// Provides a set of properties that are carried with the execution code path during remote method calls. // Token: 0x020003F2 RID: 1010 [ComVisible(true)] [Serializable] public sealed class LogicalCallContext : ICloneable, ISerializable { // Token: 0x06002734 RID: 10036 RVA: 0x00080880 File Offset: 0x0007EA80 internal LogicalCallContext() { } // Token: 0x06002735 RID: 10037 RVA: 0x00080894 File Offset: 0x0007EA94 internal LogicalCallContext(SerializationInfo info, StreamingContext context) { foreach (SerializationEntry serializationEntry in info) { if (serializationEntry.Name == "__RemotingData") { this._remotingData = (CallContextRemotingData)serializationEntry.Value; } else { this.SetData(serializationEntry.Name, serializationEntry.Value); } } } /// Gets a value indicating whether the current contains information. /// A Boolean value indicating whether the current contains information. /// /// /// // Token: 0x17000774 RID: 1908 // (get) Token: 0x06002736 RID: 10038 RVA: 0x00080914 File Offset: 0x0007EB14 public bool HasInfo { get { return this._data != null && this._data.Count > 0; } } /// Empties a data slot with the specified name. /// The name of the data slot to empty. /// /// /// // Token: 0x06002737 RID: 10039 RVA: 0x00080934 File Offset: 0x0007EB34 public void FreeNamedDataSlot(string name) { if (this._data != null) { this._data.Remove(name); } } /// Retrieves an object associated with the specified name from the current instance. /// The object in the logical call context associated with the specified name. /// The name of the item in the call context. /// /// /// // Token: 0x06002738 RID: 10040 RVA: 0x00080950 File Offset: 0x0007EB50 public object GetData(string name) { if (this._data != null) { return this._data[name]; } return null; } /// Populates a specified with the data needed to serialize the current . /// The to populate with data. /// The contextual information about the source or destination of the serialization. /// /// is null. /// The immediate caller does not have SerializationFormatter permission. /// /// /// // Token: 0x06002739 RID: 10041 RVA: 0x0008096C File Offset: 0x0007EB6C public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("__RemotingData", this._remotingData); if (this._data != null) { foreach (object obj in this._data) { DictionaryEntry dictionaryEntry = (DictionaryEntry)obj; info.AddValue((string)dictionaryEntry.Key, dictionaryEntry.Value); } } } /// Stores the specified object in the current instance, and associates it with the specified name. /// The name with which to associate the new item in the call context. /// The object to store in the call context. /// /// /// // Token: 0x0600273A RID: 10042 RVA: 0x00080A0C File Offset: 0x0007EC0C public void SetData(string name, object data) { if (this._data == null) { this._data = new Hashtable(); } this._data[name] = data; } /// Creates a new object that is a copy of the current instance. /// A new object that is a copy of this instance. /// /// /// // Token: 0x0600273B RID: 10043 RVA: 0x00080A34 File Offset: 0x0007EC34 public object Clone() { LogicalCallContext logicalCallContext = new LogicalCallContext(); logicalCallContext._remotingData = (CallContextRemotingData)this._remotingData.Clone(); if (this._data != null) { logicalCallContext._data = new Hashtable(); foreach (object obj in this._data) { DictionaryEntry dictionaryEntry = (DictionaryEntry)obj; logicalCallContext._data[dictionaryEntry.Key] = dictionaryEntry.Value; } } return logicalCallContext; } // Token: 0x17000775 RID: 1909 // (get) Token: 0x0600273C RID: 10044 RVA: 0x00080AE8 File Offset: 0x0007ECE8 internal Hashtable Datastore { get { return this._data; } } // Token: 0x04000F43 RID: 3907 private Hashtable _data; // Token: 0x04000F44 RID: 3908 private CallContextRemotingData _remotingData = new CallContextRemotingData(); } }