/// <summary> /// Creates new instance of <see cref="Services"/> /// </summary> /// <param name="platformFullSectionName">full section name of platform section</param> /// <param name="platformWebFullSectionName">full section name of platform web section</param> /// <param name="sampleFullSectionName">full section name of sample web section</param> public Services(string platformFullSectionName, string platformWebFullSectionName, string sampleFullSectionName) { if (platformFullSectionName == null) throw new MemoryPointerIsNullException("platformFullSectionName"); if (platformWebFullSectionName == null) throw new MemoryPointerIsNullException("platformWebFullSectionName"); if (sampleFullSectionName == null) throw new MemoryPointerIsNullException("sampleFullSectionName"); this.Bundle.AddServiceResolversFromAnotherBundle(new Platform.Bundles.System.Services(platformFullSectionName).Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Platform.Web.Bundles.Auth.Services(platformWebFullSectionName).Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Sample.Bundles.Auth.Services(this.Bundle.GetServiceResolver<IUTCTimeProvider>()).Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Sample.Bundles.Delegates.Services().Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Sample.Bundles.SampleTypes.Services(sampleFullSectionName).Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Sample.Bundles.AnotherTypes.Services(sampleFullSectionName).Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Sample.Bundles.YetAnotherTypes.Services(sampleFullSectionName).Bundle); this.Bundle.AddServiceResolversFromAnotherBundle(new Sample.Bundles.Meetings.Services(this.Bundle.GetServiceResolver<IDelegateProvider>()).Bundle); var contextInitData = new ContextInitData() { UTCTimeProviderResolver = this.Bundle.GetServiceResolver<IUTCTimeProvider>(), LocalTimeOffsetProviderResolver = this.Bundle.GetServiceResolver<ILocalTimeOffsetProvider>(), UICultureProviderResolver = this.Bundle.GetServiceResolver<IUICultureProvider>(), }; var contextServices = new Sample.Bundles.Contexts.Services(contextInitData, this.Bundle.GetServiceResolver<IUserDataProvider>(), this.Bundle.GetServiceResolver<IMeetingProvider>()); this.Bundle.AddServiceResolversFromAnotherBundle(contextServices.Bundle); }
/// <summary> /// Creates new instance of <see cref="ContextInitData"/> /// </summary> /// <param name="other">other context init data</param> public ContextInitData(ContextInitData other) { if (other == null) throw new MemoryPointerIsNullException("other"); this.UTCTimeProviderResolver = other.UTCTimeProviderResolver; this.LocalTimeOffsetProviderResolver = other.LocalTimeOffsetProviderResolver; this.UICultureProviderResolver = other.UICultureProviderResolver; }
/// <summary> /// Creates new instance of <see cref="ContextProvider"/> /// </summary> /// <param name="contextInitData">context initialization data</param> /// <param name="userDataProvider">user data provider</param> public ContextProvider(ContextInitData contextInitData, IServiceResolver<IUserDataProvider> userDataProviderResolver) { if (contextInitData == null) throw new MemoryPointerIsNullException("contextInitData"); if (userDataProviderResolver == null) throw new MemoryPointerIsNullException("userDataProviderResolver"); this.contextInitData = contextInitData; this.userDataProviderResolver = userDataProviderResolver; }
/// <summary> /// Creates new instance of <see cref="ContextInitData"/> /// </summary> /// <param name="other">other context init data</param> public ContextInitData(ContextInitData other) { if (other == null) { throw new MemoryPointerIsNullException("other"); } this.UTCTimeProviderResolver = other.UTCTimeProviderResolver; this.LocalTimeOffsetProviderResolver = other.LocalTimeOffsetProviderResolver; this.UICultureProviderResolver = other.UICultureProviderResolver; }
/// <summary> /// Creates new instance of <see cref="SampleContextProvider"/> /// </summary> /// <param name="contextInitData">context initialization data</param> /// <param name="userDataProviderResolver">user data provider resolver</param> /// <param name="meetingProviderResolver">meeting provider resolver</param> public SampleContextProvider( ContextInitData contextInitData, IServiceResolver<IUserDataProvider> userDataProviderResolver, IServiceResolver<IMeetingProvider> meetingProviderResolver) : base(contextInitData, userDataProviderResolver) { if (meetingProviderResolver == null) throw new MemoryPointerIsNullException("meetingProviderResolver"); this.meetingProviderResolver = meetingProviderResolver; }
/// <summary> /// Creates new instance of <see cref="SampleServices"/> /// </summary> /// <param name="contextInitData">context init data</param> /// <param name="sampleFullSectionName">sample full section name</param> public SampleServices(ContextInitData contextInitData, string sampleFullSectionName) { if (contextInitData == null) throw new MemoryPointerIsNullException("contextInitData"); if (sampleFullSectionName == null) throw new MemoryPointerIsNullException("sampleFullSectionName"); this.contextInitData = contextInitData; this.sampleFullSectionName = sampleFullSectionName; InitializeBundle(); }
/// <summary> /// Creates new instance of <see cref="Context"/> /// </summary> /// <param name="initData">initialization data</param> public Context(ContextInitData initData) { if (initData == null) throw new MemoryPointerIsNullException("initData"); initData.ValidatePropertiesNotNull(); this.UTCTimeProviderResolver = initData.UTCTimeProviderResolver; this.localTimeOffsetProviderResolver = initData.LocalTimeOffsetProviderResolver; this.UICultureProviderResolver = initData.UICultureProviderResolver; this.items = new Dictionary<string, object>(); }
/// <summary> /// Creates new instance of <see cref="Services"/> /// </summary> /// <param name="contextInitData">context initialization data</param> /// <param name="userDataProviderResolver">user data provider resolver</param> /// <param name="meetingProviderResolver">meeting provider resolver</param> public Services(ContextInitData contextInitData, IServiceResolver<IUserDataProvider> userDataProviderResolver, IServiceResolver<IMeetingProvider> meetingProviderResolver) { if (contextInitData == null) throw new MemoryPointerIsNullException("contextInitData"); if (userDataProviderResolver == null) throw new MemoryPointerIsNullException("userDataProviderResolver"); if (meetingProviderResolver == null) throw new MemoryPointerIsNullException("meetingProviderResolver"); var contextProvider = new SampleContextProvider(contextInitData, userDataProviderResolver, meetingProviderResolver); this.Bundle.AddServiceResolver(new ServiceResolver<ISampleContextProvider>(contextProvider)); }
/// <summary> /// Creates new instance of <see cref="ContextProvider"/> /// </summary> /// <param name="contextInitData">context initialization data</param> /// <param name="userDataProvider">user data provider</param> public ContextProvider(ContextInitData contextInitData, IServiceResolver <IUserDataProvider> userDataProviderResolver) { if (contextInitData == null) { throw new MemoryPointerIsNullException("contextInitData"); } if (userDataProviderResolver == null) { throw new MemoryPointerIsNullException("userDataProviderResolver"); } this.contextInitData = contextInitData; this.userDataProviderResolver = userDataProviderResolver; }
/// <summary> /// Creates new instance of <see cref="Context"/> /// </summary> /// <param name="initData">initialization data</param> public Context(ContextInitData initData) { if (initData == null) { throw new MemoryPointerIsNullException("initData"); } initData.ValidatePropertiesNotNull(); this.UTCTimeProviderResolver = initData.UTCTimeProviderResolver; this.localTimeOffsetProviderResolver = initData.LocalTimeOffsetProviderResolver; this.UICultureProviderResolver = initData.UICultureProviderResolver; this.items = new Dictionary <string, object>(); }
/// <summary> /// Creates new instance of <see cref="MeetingContextInitData"/> /// </summary> /// <param name="contextInitData">context init data</param> public MeetingContextInitData(ContextInitData contextInitData) : base(contextInitData) { }
/// <summary> /// Creates new instance of <see cref="UserContextInitData"/> /// </summary> /// <param name="contextInitData">context init data</param> public UserContextInitData(ContextInitData contextInitData) : base(contextInitData) { }