public void DeleteLocalDataStore(LocalDataStore store)
		{
			bool flag = false;
			RuntimeHelpers.PrepareConstrainedRegions();
			try
			{
				Monitor.Enter(this, ref flag);
				this.m_ManagedLocalDataStores.Remove(store);
			}
			finally
			{
				if (flag)
				{
					Monitor.Exit(this);
				}
			}
		}
		public LocalDataStoreHolder CreateLocalDataStore()
		{
			LocalDataStore localDataStore = new LocalDataStore(this, this.m_SlotInfoTable.Length);
			LocalDataStoreHolder result = new LocalDataStoreHolder(localDataStore);
			bool flag = false;
			RuntimeHelpers.PrepareConstrainedRegions();
			try
			{
				Monitor.Enter(this, ref flag);
				this.m_ManagedLocalDataStores.Add(localDataStore);
			}
			finally
			{
				if (flag)
				{
					Monitor.Exit(this);
				}
			}
			return result;
		}
예제 #3
0
 private static extern void SetDomainLocalStore(LocalDataStore dls);
		public LocalDataStoreHolder(LocalDataStore store)
		{
			this.m_Store = store;
		}
예제 #5
0
        [System.Security.SecuritySafeCritical]  // auto-generated
        public LocalDataStoreHolder CreateLocalDataStore()
        {
            // Create a new local data store.
            LocalDataStore store = new LocalDataStore(this, m_SlotInfoTable.Length);
            LocalDataStoreHolder holder = new LocalDataStoreHolder(store);

            bool tookLock = false;
            RuntimeHelpers.PrepareConstrainedRegions();
            try
            {
                Monitor.Enter(this, ref tookLock);
                // Add the store to the array list and return it.
                m_ManagedLocalDataStores.Add(store);
            }
            finally
            {
                if (tookLock)
                    Monitor.Exit(this);
            }
            return holder;
        }
예제 #6
0
 private static void RemoveDomainLocalStore(LocalDataStore dls)
 {
     if (dls != null)
     {
         LocalDataStoreManager.DeleteLocalDataStore(dls);
     }
 }
예제 #7
0
        /*=========================================================================
		 * Remove the specified store from the list of managed stores..
        =========================================================================*/
    	public void DeleteLocalDataStore(LocalDataStore store)
		{
	        lock(this) {
        		// Remove the store to the array list and return it.
        		m_ManagedLocalDataStores.Remove(store);
        	}
		}
예제 #8
0
 [System.Security.SecuritySafeCritical]  // auto-generated
 public void DeleteLocalDataStore(LocalDataStore store)
 {
     bool tookLock = false;
     RuntimeHelpers.PrepareConstrainedRegions();
     try
     {
         Monitor.Enter(this, ref tookLock);
         // Remove the store to the array list and return it.
         m_ManagedLocalDataStores.Remove(store);
     }
     finally
     {
         if (tookLock)
             Monitor.Exit(this);
     }
 }
예제 #9
0
        /*=========================================================================
        ** Create a data store to be managed by this manager and add it to the
		** list. The initial size of the new store matches the number of slots
		** allocated in this manager.
        =========================================================================*/
    	public LocalDataStore CreateLocalDataStore()
    	{
        	// Create a new local data store.
        	LocalDataStore Store = new LocalDataStore(this, m_SlotInfoTable.Length);
        		
	        lock(this) {
        		// Add the store to the array list and return it.
        		m_ManagedLocalDataStores.Add(Store);
        	}
       		return Store;
	    }
예제 #10
0
 public LocalDataStore CreateLocalDataStore()
 {
     LocalDataStore store = new LocalDataStore(this, this.m_SlotInfoTable.Length);
     bool tookLock = false;
     RuntimeHelpers.PrepareConstrainedRegions();
     try
     {
         Monitor.ReliableEnter(this, ref tookLock);
         this.m_ManagedLocalDataStores.Add(store);
     }
     finally
     {
         if (tookLock)
         {
             Monitor.Exit(this);
         }
     }
     return store;
 }
예제 #11
0
파일: thread.cs 프로젝트: ArildF/masters
 /***
  * An appdomain has been unloaded - remove its DLS from the manager
  */
 static private void RemoveDomainLocalStore(LocalDataStore dls)
 {
     if (dls != null)
         m_LocalDataStoreMgr.DeleteLocalDataStore(dls);
 }
        }                                        // Dummy constructor

        public LocalDataStoreHolder(LocalDataStore store)
        {
        }                                                            // 0x000000018024B380-0x000000018024B3B0
 public LocalDataStoreHolder CreateLocalDataStore()
 {
     LocalDataStore store = new LocalDataStore(this, this.m_SlotInfoTable.Length);
     LocalDataStoreHolder holder = new LocalDataStoreHolder(store);
     bool lockTaken = false;
     RuntimeHelpers.PrepareConstrainedRegions();
     try
     {
         Monitor.Enter(this, ref lockTaken);
         this.m_ManagedLocalDataStores.Add(store);
     }
     finally
     {
         if (lockTaken)
         {
             Monitor.Exit(this);
         }
     }
     return holder;
 }