Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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();
        }