private void ConfigureContextManager() { IContextStore contextStore = this.Configuration.GetSetting <IContextStore>(); ContextManager.GlobalContainer = this.container; ContextManager.SetContextStore(contextStore); }
public WcfServiceLocatorStore(IContextStore store) { AddStore <IContextStore>(store); AddStore <IResolutionStore>(new WcfResolutionStore()); AddStore <IExecutionStore>(WcfContextExecutionStore.New(this)); AddStore <IAwarenessStore>(new AwarenessStore()); AddStore <IInjectionOverrideStore>(new InjectionOverrideStore()); }
public ThreadedServiceLocatorStore(IContextStore store) { AddStore <IContextStore>(store); AddStore <IResolutionStore>(new ThreadedResolutionStore()); AddStore <IExecutionStore>(ThreadedExecutionStore.New(this)); AddStore <IAwarenessStore>(new AwarenessStore()); AddStore <IInjectionOverrideStore>(new InjectionOverrideStore()); }
public static void Destruct(this IContextStore store) { foreach (var dep in store.GetContextInstances()) { dep.Cleaner?.Destruct(dep.Key, dep.Instance); } store.GetContextInstances().Clear(); }
public static ConcurrentDictionary <DependencyRegistration, object> GetConcurrentContextInstances( this IContextStore store) { lock (store) { if (!(store[CTX_INSTANCES_KEY_CONCURRENT] is ConcurrentDictionary <DependencyRegistration, object> regs)) { store[CTX_INSTANCES_KEY_CONCURRENT] = regs = new ConcurrentDictionary <DependencyRegistration, object>(); } return(regs); } }
public ThreadedServiceLocatorStore(IContextStore store) { AddStore <IContextStore>(store); AddStore <IResolutionStore>(new ThreadedResolutionStore()); AddStore <IExecutionStore>(ThreadedExecutionStore.New(this)); }
public static void SetContextStore(IContextStore contextStore) { store = contextStore; }
public BreadCrumbProvider(IContextStore store) { this.store = store; }
public LoginStatusContextStore(IContextStore context) { this.context = context; }
// This constructor is used by the MVC framework to instantiate the controller using // the default forms authentication and membership providers. public AccountController(IContextStore contextStore) : this(null, null) { this.contextStore = contextStore; }
public BookListProvider(IContextStore store) { this.store = store; }
public HttpServiceLocatorStore(IContextStore store) { AddStore <IContextStore>(store); AddStore <IResolutionStore>(new HttpResolutionStore()); AddStore <IExecutionStore>(HttpContextExecutionStore.New(this)); }
public RecentlyViewedProvider(IContextStore store, ISavedItemsProvider savedItemsProvider) { this.store = store; this.savedItemsProvider = savedItemsProvider; }
public CatgoryMenuContextStore(IContextStore context) { this.context = context; }
public LatestBooksProvider(IContextStore store, ISavedItemsProvider savedItemsProvider) { this.store = store; this.savedItemsProvider = savedItemsProvider; }
public static IList <ContextStoreDependency> GetContextInstances(this IContextStore store) { return((IList <ContextStoreDependency>) (store["__OR_CTX_INSTANCES_KEY"] ?? (store["__OR_CTX_INSTANCES_KEY"] = new List <ContextStoreDependency>()))); }
public static T Get <T>(this IContextStore source, string name) { return((T)source.Get(name)); }
public SavedItemsProvider(IContextStore contextStore) { this.contextStore = contextStore; }
public static ConcurrentDictionary <DependencyRegistration, object> GetConcurrentContextInstances(this IContextStore store) { lock (store) { return(store.GetOrAdd(CTX_INSTANCES_KEY_CONCURRENT, () => new ConcurrentDictionary <DependencyRegistration, object>())); } }
public static IBootstrapper ConfigureWith(this IBootstrapper bootstrapper, IContextStore contextStore) { bootstrapper.Configuration.SetSettingInstance(contextStore); return(bootstrapper); }
public CurrentCategoryProvider(IContextStore store) { this.store = store; }
public BooksOfTheWeekProvider(IContextStore context, ISavedItemsProvider savedItemsProvider) { this.context = context; this.savedItemsProvider = savedItemsProvider; }
public HttpServiceLocator(IServiceLocatorAdapter serviceLocator, IContextStore store) : this(serviceLocator, new HttpServiceLocatorStore(store)) { }
void StoreInstanceInContext(IContextStore contextStore, string key, object instance) { contextStore[key] = instance; contextStore.GetContextInstances().Add(new ContextStoreDependency(key, instance, Resolver.Registrations)); }
public CartProvider(IContextStore store) { this.store = store; }