/// <summary> /// Initializes a new instance of the <see cref="ExportContext"/> class. /// </summary> public ExportContext() { var domainServiceUrl = ClientConstants.RootDomainServiceUrl; var serviceUrl = new Uri(String.Format("{0}/{1}", domainServiceUrl, "FoundOps-Server-Services-CoreDomainService-CoreDomainService.svc"), UriKind.RelativeOrAbsolute); CoreDomainContext = new CoreDomainContext(serviceUrl); ((WebDomainClient<CoreDomainContext.ICoreDomainServiceContract>)CoreDomainContext.DomainClient).ChannelFactory.Endpoint.Binding.OpenTimeout = new TimeSpan(0, 10, 0); ((WebDomainClient<CoreDomainContext.ICoreDomainServiceContract>)CoreDomainContext.DomainClient).ChannelFactory.Endpoint.Binding.CloseTimeout = new TimeSpan(0, 10, 0); ((WebDomainClient<CoreDomainContext.ICoreDomainServiceContract>)CoreDomainContext.DomainClient).ChannelFactory.Endpoint.Binding.ReceiveTimeout = new TimeSpan(0, 10, 0); ((WebDomainClient<CoreDomainContext.ICoreDomainServiceContract>)CoreDomainContext.DomainClient).ChannelFactory.Endpoint.Binding.SendTimeout = new TimeSpan(0, 10, 0); }
public DataManager(ContextManager contextManager, CoreDomainContext coreDomainContext) { ContextManager = contextManager; _coreDomainContext = coreDomainContext; _domainContextHasChangesHelper = _domainContextHasChangesSubject.ToProperty(this, x => x.DomainContextHasChanges); _domainContextIsSubmittingHelper = _domainContextIsSubmittingSubject.ToProperty(this, x => x.DomainContextIsSubmitting); //Keep track of domain context changes and domain context is submitting every quarter second (and update this public properties) Observable.Interval(TimeSpan.FromMilliseconds(250)).ObserveOnDispatcher().Subscribe(_ => { _domainContextHasChangesSubject.OnNext(this.DomainContext.HasChanges); _domainContextIsSubmittingSubject.OnNext(this.DomainContext.IsSubmitting); }); SetupConsolidatedSubmit(); }