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; }
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); }
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); }
[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); }
[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; }
public static void SetData(LocalDataStoreSlot slot, object data) { LocalDataStoreHolder holder = s_LocalDataStore; if (holder == null) { holder = LocalDataStoreManager.CreateLocalDataStore(); s_LocalDataStore = holder; } holder.Store.SetData(slot, data); }
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; }