internal WhenDsl(TDsl innerDsl, Type guardConstraintType, FilterScope scope) { Scope = scope; this.innerDsl = innerDsl; guardContraintRegistration = innerDsl.CreateTypeRegistration(guardConstraintType, EmptyActionDescriptor.Instance, EmptyControllerDescriptor.Instance, scope); //guardContraintRegistration = CreateTypeRegistration(guardConstraintType, EmptyActionDescriptor.Instance, EmptyControllerDescriptor.Instance); }
public override void Build(Container container) { var factoryType = container.GetFactoryForType(this.ServiceType.Type); var creator = new AbstractFactoryCreator(factoryType); var registration = new TransientRegistration(creator); container.AddRegistration(new TypeKey(this.ServiceType.Type.TypeHandle, this.ServiceType.Key), registration); }
private static Apply CreateDsl(TransientRegistration constraintRegistration) { var dsl = new Apply(); dsl.AddRegistration(constraintRegistration); return(dsl); }
public Person( IChangeTrackingService memento, ChangeTrackingRegistration registration, TransientRegistration transientRegistration ) : base( memento, registration ) { this.transientRegistration = transientRegistration; this.nameRejectCallback = ( pcr ) => { this.CacheChangeOnRejectCallback( "property-name", this.Name, nameRejectCallback, null, pcr ); this._name = pcr.CachedValue; }; }
public Person(IChangeTrackingService memento, ChangeTrackingRegistration registration, TransientRegistration transientRegistration) : base(memento, registration) { this.transientRegistration = transientRegistration; this.nameRejectCallback = (pcr) => { this.CacheChangeOnRejectCallback("property-name", this.Name, nameRejectCallback, null, pcr); this._name = pcr.CachedValue; }; }
protected override void OnRegisterTransient( TransientRegistration transientRegistration ) { base.OnRegisterTransient( this.transientRegistration ); }
/// <summary> /// Called in order to register this instance as transient. /// </summary> protected virtual void OnRegisterTransient(TransientRegistration transientRegistration) { var autoRemove = transientRegistration == TransientRegistration.AsTransparent; ((IMemento)this).Memento.RegisterTransient(this, autoRemove); }
protected override void OnRegisterTransient(TransientRegistration transientRegistration) { base.OnRegisterTransient(this.transientRegistration); }