protected override StateContainer Hydrating(IHydrationObject obj) { ResourceLimitingStateContainer container = obj.State.Deserialize<ResourceLimitingStateContainer>(); container.Prototype = BundlePrototype; Limiter.Hydrate(container.LimiterState); return container; }
protected override StateContainer Hydrating(IHydrationObject obj) { InMemoryStateContainer container = obj.State.Deserialize <InMemoryStateContainer>(); Pending = container.Pending; return(container); }
public IRequestResult Hydrate(IHydrationObject obj) { if (obj.IsNotNull() && obj.State.IsNotNull()) { var container = obj.State.Deserialize<StateContainer>(); Target = container.Target; MimeType = container.MimeType; } return RequestResult.Create(); }
// TODO: public IRequestResult Hydrate(IHydrationObject obj) { if (obj.IsNotNull() && obj.State.IsNotNull()) { Messages = obj.State.Deserialize <StateContainer>().Messages; } return(RequestResult.Create()); }
protected override StateContainer Hydrating(IHydrationObject obj) { ResourceLimitingStateContainer container = obj.State.Deserialize <ResourceLimitingStateContainer>(); container.Prototype = BundlePrototype; Limiter.Hydrate(container.LimiterState); return(container); }
public override IRequestResult Hydrate(IHydrationObject memento) { if (memento.IsNotNull() && memento.State.IsNotNull()) { Units = memento.State.Deserialize <List <IProcessableUnit> >(); } return(RequestResult.Create()); }
public IRequestResult Hydrate(IHydrationObject obj) { if (obj.IsNotNull() && obj.State.IsNotNull()) { var container = obj.State.Deserialize <StateContainer>(); Target = container.Target; MimeType = container.MimeType; } return(RequestResult.Create()); }
public virtual IRequestResult Hydrate(IHydrationObject obj) { if (obj.IsNotNull() && obj.State.IsNotNull()) { StateContainer container = Hydrating(obj); BundlePrototype = container.BundlePrototype; FailureHandlerSet = container.FailureHandlers.Select(def => HydrationService.Restore <IFailureHandler>(def)).ToArray(); } // In case was blocked, ensure available again Blocked = false; return(RequestResult.Create()); }
public TType Restore <TType>(IHydrationObject obj) where TType : IHydratableDependent { TType result = default(TType); if (obj.ConcreteType != null) { var interim = DependencyFacilitator .Delegate <IHydratableDependent>(f => { var matches = f.InstantiateAll <IHydratableDependent>(obj.ServiceInterface); return(matches.FirstOrDefault(o => o.GetType() == obj.ConcreteType)); }); Assert.True(interim.IsNotNull(), () => "Cannot instantiate hydration object: " + obj.ToString() + ", are you trying to restore a state incompatible with your services?"); interim.Hydrate(obj); result = (TType)interim; } return(result); }
public virtual IRequestResult Hydrate(IHydrationObject memento) { return(RequestResult.Create()); }
protected abstract StateContainer Hydrating(IHydrationObject obj);
public override IRequestResult Hydrate(IHydrationObject memento) { if (memento.IsNotNull() && memento.State.IsNotNull()) Units = memento.State.Deserialize<List<IProcessableUnit>>(); return RequestResult.Create(); }
public IRequestResult Hydrate(IHydrationObject memento) { MessagesPending = memento.IsNull() || memento.State.IsNull() ? 0 : int.Parse(memento.State); return RequestResult.Create(); }
protected override StateContainer Hydrating(IHydrationObject obj) { InMemoryStateContainer container = obj.State.Deserialize<InMemoryStateContainer>(); Pending = container.Pending; return container; }
public virtual IRequestResult Hydrate(IHydrationObject memento) { return RequestResult.Create(); }
// TODO: public IRequestResult Hydrate(IHydrationObject obj) { if (obj.IsNotNull() && obj.State.IsNotNull()) Messages = obj.State.Deserialize<StateContainer>().Messages; return RequestResult.Create(); }
public virtual IRequestResult Hydrate(IHydrationObject obj) { if (obj.IsNotNull() && obj.State.IsNotNull()) { StateContainer container = Hydrating(obj); BundlePrototype = container.BundlePrototype; FailureHandlerSet = container.FailureHandlers.Select(def => HydrationService.Restore<IFailureHandler>(def)).ToArray(); } // In case was blocked, ensure available again Blocked = false; return RequestResult.Create(); }
public IRequestResult Hydrate(IHydrationObject memento) { MessagesPending = memento.IsNull() || memento.State.IsNull() ? 0 : int.Parse(memento.State); return(RequestResult.Create()); }