System.Runtime.Remoting.Contexts.Context.AllocateDataSlot C# (CSharp) 메소드

AllocateDataSlot() 개인적인 메소드

private AllocateDataSlot ( ) : LocalDataStoreSlot
리턴 LocalDataStoreSlot
        public static LocalDataStoreSlot AllocateDataSlot()
        {
            return _localDataStoreMgr.AllocateDataSlot();            
        }
	/// <internalonly/>

Usage Example

예제 #1
0
        /// <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>
        public static LocalDataStoreSlot AllocateNamedDataSlot(string name)
        {
            object             syncRoot = Context.namedSlots.SyncRoot;
            LocalDataStoreSlot result;

            lock (syncRoot)
            {
                LocalDataStoreSlot localDataStoreSlot = Context.AllocateDataSlot();
                Context.namedSlots.Add(name, localDataStoreSlot);
                result = localDataStoreSlot;
            }
            return(result);
        }