protected virtual IAttributeSetInstanceExtensionFieldStateCreated MapCreate(ICreateAttributeSetInstanceExtensionField c, IAttributeSetInstanceExtensionFieldGroupCommand outerCommand, long version, IAttributeSetInstanceExtensionFieldGroupState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeSetInstanceExtensionFieldStateEventId(c.GroupId, c.Index, version);
            IAttributeSetInstanceExtensionFieldStateCreated e = NewAttributeSetInstanceExtensionFieldStateCreated(stateEventId);
            var s = outerState.Fields.Get(c.Index);

            e.Name        = c.Name;
            e.Type        = c.Type;
            e.Length      = c.Length;
            e.Alias       = c.Alias;
            e.Description = c.Description;
            e.Active      = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(ICreate... ////////////////////////////
        protected virtual IAttributeSetInstanceExtensionFieldStateCreated Map(ICreateAttributeSetInstanceExtensionField c)
        {
            var stateEventId = new AttributeSetInstanceExtensionFieldEventId(c.Name, c.Version);
            IAttributeSetInstanceExtensionFieldStateCreated e = NewAttributeSetInstanceExtensionFieldStateCreated(stateEventId);

            e.Type        = c.Type;
            e.Length      = c.Length;
            e.Alias       = c.Alias;
            e.Description = c.Description;
            e.GroupId     = c.GroupId;
            e.Active      = c.Active;
            e.CommandId   = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            var version = c.Version;


            return(e);
        }
 void ICreateAttributeSetInstanceExtensionFieldCommands.Remove(ICreateAttributeSetInstanceExtensionField c)
 {
     _innerCommands.Remove((CreateAttributeSetInstanceExtensionFieldDto)c);
 }
Exemplo n.º 4
0
 public void Remove(ICreateAttributeSetInstanceExtensionField c)
 {
     _innerCommands.Remove(c);
 }
Exemplo n.º 5
0
 public void Add(ICreateAttributeSetInstanceExtensionField c)
 {
     _innerCommands.Add(c);
 }
Exemplo n.º 6
0
 void IAttributeSetInstanceExtensionFieldApplicationService.When(ICreateAttributeSetInstanceExtensionField c)
 {
     this.When((CreateAttributeSetInstanceExtensionFieldDto)c);
 }
        public virtual void Create(ICreateAttributeSetInstanceExtensionField c)
        {
            IAttributeSetInstanceExtensionFieldStateCreated e = Map(c);

            Apply(e);
        }
Exemplo n.º 8
0
 public virtual void When(ICreateAttributeSetInstanceExtensionField c)
 {
     Update(c, ar => ar.Create(c));
 }