public virtual RoleStateEventId ToRoleStateEventId()
        {
            RoleStateEventId v = new RoleStateEventId();

            v.RoleId  = this.RoleId;
            v.Version = this.Version;
            return(v);
        }
 public RoleStateEventIdDtoWrapper(RoleStateEventId val)
 {
     if (val == null)
     {
         throw new ArgumentNullException("val");
     }
     this._value = val;
 }
Exemple #3
0
        protected RoleStateDeleted NewRoleStateDeleted(string commandId, string requesterId)
        {
            var stateEventId = new RoleStateEventId(_state.RoleId, ((IRoleStateProperties)_state).Version);
            var e            = NewRoleStateDeleted(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }
Exemple #4
0
        protected virtual IRoleStateDeleted Map(IDeleteRole c)
        {
            var stateEventId    = new RoleStateEventId(c.RoleId, c.Version);
            IRoleStateDeleted e = NewRoleStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


            return(e);
        }
Exemple #5
0
        protected virtual IRoleStateCreated Map(ICreateRole c)
        {
            var stateEventId    = new RoleStateEventId(c.RoleId, c.Version);
            IRoleStateCreated e = NewRoleStateCreated(stateEventId);

            e.Name        = c.Name;
            e.Description = c.Description;
            e.Active      = c.Active;
            e.CommandId   = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;
            var version = c.Version;


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

            RoleStateEventId other = obj as RoleStateEventId;

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

            return(true &&
                   Object.Equals(this.RoleId, other.RoleId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Exemple #7
0
        protected virtual IRoleStateMergePatched Map(IMergePatchRole c)
        {
            var stateEventId         = new RoleStateEventId(c.RoleId, c.Version);
            IRoleStateMergePatched e = NewRoleStateMergePatched(stateEventId);

            e.Name                         = c.Name;
            e.Description                  = c.Description;
            e.Active                       = c.Active;
            e.IsPropertyNameRemoved        = c.IsPropertyNameRemoved;
            e.IsPropertyDescriptionRemoved = c.IsPropertyDescriptionRemoved;
            e.IsPropertyActiveRemoved      = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;

            var version = c.Version;


            return(e);
        }
Exemple #8
0
 private RoleStateDeleted NewRoleStateDeleted(RoleStateEventId stateEventId)
 {
     return(new RoleStateDeleted(stateEventId));
 }
Exemple #9
0
 private RoleStateMergePatched NewRoleStateMergePatched(RoleStateEventId stateEventId)
 {
     return(new RoleStateMergePatched(stateEventId));
 }
 public RoleStateEventIdFlattenedDto(RoleStateEventId val)
 {
     this._value = new RoleStateEventIdDtoWrapper(val);
 }
Exemple #11
0
 protected RoleStateEventBase(RoleStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Exemple #12
0
 public RoleStateDeleted(RoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #13
0
 public RoleStateMergePatched(RoleStateEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #14
0
 public RoleStateCreated(RoleStateEventId stateEventId) : base(stateEventId)
 {
 }