protected OrganizationStructureStateDeleted NewOrganizationStructureStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new OrganizationStructureEventId(_state.Id, version);
            var e            = NewOrganizationStructureStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
        protected virtual IOrganizationStructureStateDeleted Map(IDeleteOrganizationStructure c)
        {
            var stateEventId = new OrganizationStructureEventId(c.Id, c.Version);
            IOrganizationStructureStateDeleted e = NewOrganizationStructureStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            OrganizationStructureEventId other = obj as OrganizationStructureEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.Id, other.Id) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
        protected virtual IOrganizationStructureStateMergePatched Map(IMergePatchOrganizationStructure c)
        {
            var stateEventId = new OrganizationStructureEventId(c.Id, c.Version);
            IOrganizationStructureStateMergePatched e = NewOrganizationStructureStateMergePatched(stateEventId);

            e.Active = c.Active;
            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);
        }
示例#5
0
 protected OrganizationStructureStateEventDtoBase(OrganizationStructureEventId stateEventId)
 {
     this.OrganizationStructureEventId = stateEventId;
 }
示例#6
0
 public OrganizationStructureStateDeleted(OrganizationStructureEventId stateEventId) : base(stateEventId)
 {
 }
示例#7
0
 public OrganizationStructureStateMergePatched(OrganizationStructureEventId stateEventId) : base(stateEventId)
 {
 }
示例#8
0
 protected OrganizationStructureStateEventBase(OrganizationStructureEventId stateEventId) : base(stateEventId)
 {
 }
 private OrganizationStructureStateDeleted NewOrganizationStructureStateDeleted(OrganizationStructureEventId stateEventId)
 {
     return(new OrganizationStructureStateDeleted(stateEventId));
 }
 private OrganizationStructureStateMergePatched NewOrganizationStructureStateMergePatched(OrganizationStructureEventId stateEventId)
 {
     return(new OrganizationStructureStateMergePatched(stateEventId));
 }