protected TInstance LoadInstance(TKey key, object loadingContext, TimeSpan timeout) { SingletonDictionaryManager <TKey, TInstance> .LoadInstanceAsyncResult loadInstanceAsyncResult = new SingletonDictionaryManager <TKey, TInstance> .LoadInstanceAsyncResult(this, key, loadingContext, timeout, null, null); loadInstanceAsyncResult.RunSynchronously(); return(loadInstanceAsyncResult.Instance); }
protected TInstance GetInstance(TKey key, TimeSpan timeout) { SingletonDictionaryManager <TKey, TInstance> .GetInstanceAsyncResult getInstanceAsyncResult = new SingletonDictionaryManager <TKey, TInstance> .GetInstanceAsyncResult(this, key, timeout, null, null); getInstanceAsyncResult.RunSynchronously(); return(getInstanceAsyncResult.Instance); }
protected void UnloadInstance(TKey key, object unloadingContext, bool shouldAbort, TimeSpan timeout) { SingletonDictionaryManager <TKey, TInstance> .UnloadInstanceAsyncResult unloadInstanceAsyncResult = new SingletonDictionaryManager <TKey, TInstance> .UnloadInstanceAsyncResult(this, key, unloadingContext, shouldAbort, timeout, null, null); unloadInstanceAsyncResult.RunSynchronously(); }