/// <summary> /// Initializes a new instance of the /// <see cref="DataLoaderConfigurationLatchProxy" /> class. /// </summary> /// <param name="key"> The key that identifies the global latch. </param> public DataLoaderConfigurationLatchProxy(DataLoaderConfigurationKey key) { this.aquired = false; this.key = key; }
/// <summary> /// Creates the default latch for the data loader configuration locking. /// </summary> /// <param name="dataLoader"> The data loader. </param> /// <returns> The latch. </returns> private static IDataLoaderConfigurationLatch CreateLatch(IDataLoader dataLoader) { DataLoaderConfigurationKey key = new DataLoaderConfigurationKey(dataLoader); return(new DataLoaderConfigurationLatchProxy(key)); }
/// <summary> /// Creates the default latch for the data loader configuration locking. /// </summary> /// <param name="dataLoader"> The data loader. </param> /// <returns> The latch. </returns> private static IDataLoaderConfigurationLatch CreateLatch(IDataLoader dataLoader) { DataLoaderConfigurationKey key = new DataLoaderConfigurationKey(dataLoader); return new DataLoaderConfigurationLatchProxy(key); }
/// <summary> /// Return the latch associated to specified data loader configuration /// </summary> /// <param name="key"> Identifies the data loader configuration. </param> /// <returns> The configuration latch. </returns> public static DataLoaderConfigurationLatch GetLatch( DataLoaderConfigurationKey key) { return store.Get(key, () => new DataLoaderConfigurationLatch()); }
/// <summary> /// Return the latch associated to specified data loader configuration /// </summary> /// <param name="key"> Identifies the data loader configuration. </param> /// <returns> The configuration latch. </returns> public static DataLoaderConfigurationLatch GetLatch( DataLoaderConfigurationKey key) { return(store.Get(key, () => new DataLoaderConfigurationLatch())); }