protected virtual IAttributeSetInstanceExtensionFieldStateMergePatched Map(IMergePatchAttributeSetInstanceExtensionField c)
        {
            var stateEventId = new AttributeSetInstanceExtensionFieldEventId(c.Name, c.Version);
            IAttributeSetInstanceExtensionFieldStateMergePatched e = NewAttributeSetInstanceExtensionFieldStateMergePatched(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.IsPropertyTypeRemoved        = c.IsPropertyTypeRemoved;
            e.IsPropertyLengthRemoved      = c.IsPropertyLengthRemoved;
            e.IsPropertyAliasRemoved       = c.IsPropertyAliasRemoved;
            e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved;
            e.IsPropertyGroupIdRemoved     = c.IsPropertyGroupIdRemoved;
            e.IsPropertyActiveRemoved      = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


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

            var version = c.Version;


            return(e);
        }
Exemple #2
0
 void IAttributeSetInstanceExtensionFieldApplicationService.When(IMergePatchAttributeSetInstanceExtensionField c)
 {
     this.When((MergePatchAttributeSetInstanceExtensionFieldDto)c);
 }
        }// END Map(ICreate... ////////////////////////////

        protected virtual IAttributeSetInstanceExtensionFieldStateMergePatched MapMergePatch(IMergePatchAttributeSetInstanceExtensionField c, IAttributeSetInstanceExtensionFieldGroupCommand outerCommand, long version, IAttributeSetInstanceExtensionFieldGroupState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeSetInstanceExtensionFieldStateEventId(c.GroupId, c.Index, version);
            IAttributeSetInstanceExtensionFieldStateMergePatched e = NewAttributeSetInstanceExtensionFieldStateMergePatched(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.IsPropertyNameRemoved        = c.IsPropertyNameRemoved;
            e.IsPropertyTypeRemoved        = c.IsPropertyTypeRemoved;
            e.IsPropertyLengthRemoved      = c.IsPropertyLengthRemoved;
            e.IsPropertyAliasRemoved       = c.IsPropertyAliasRemoved;
            e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved;
            e.IsPropertyActiveRemoved      = c.IsPropertyActiveRemoved;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
        public virtual void MergePatch(IMergePatchAttributeSetInstanceExtensionField c)
        {
            IAttributeSetInstanceExtensionFieldStateMergePatched e = Map(c);

            Apply(e);
        }
Exemple #5
0
 public virtual void When(IMergePatchAttributeSetInstanceExtensionField c)
 {
     Update(c, ar => ar.MergePatch(c));
 }