private AttributeAliasEventId NewAttributeAliasEventId(string code) { var eId = new AttributeAliasEventId(); eId.AttributeId = this.AttributeEventId.AttributeId; eId.Code = code; eId.AttributeVersion = this.AttributeEventId.Version; return(eId); }
}// END Map(IMergePatch... //////////////////////////// protected virtual IAttributeAliasStateRemoved MapRemove(IRemoveAttributeAlias c, IAttributeCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new AttributeAliasEventId(c.AttributeId, c.Code, version); IAttributeAliasStateRemoved e = NewAttributeAliasStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
protected virtual IAttributeAliasStateCreated MapCreate(ICreateAttributeAlias c, IAttributeCommand outerCommand, long version, IAttributeState outerState) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new AttributeAliasEventId(c.AttributeId, c.Code, version); IAttributeAliasStateCreated e = NewAttributeAliasStateCreated(stateEventId); var s = outerState.Aliases.Get(c.Code, true); e.Name = c.Name; e.Active = c.Active; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(ICreate... ////////////////////////////
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } AttributeAliasEventId other = obj as AttributeAliasEventId; if (other == null) { return(false); } return(true && Object.Equals(this.AttributeId, other.AttributeId) && Object.Equals(this.Code, other.Code) && Object.Equals(this.AttributeVersion, other.AttributeVersion) ); }
protected AttributeAliasEventBase(AttributeAliasEventId stateEventId) { this.AttributeAliasEventId = stateEventId; }
public AttributeAliasStateRemoved(AttributeAliasEventId stateEventId) : base(stateEventId) { }
public AttributeAliasStateMergePatched(AttributeAliasEventId stateEventId) : base(stateEventId) { }
public AttributeAliasStateCreated(AttributeAliasEventId stateEventId) : base(stateEventId) { }
protected AttributeAliasStateEventBase(AttributeAliasEventId stateEventId) : base(stateEventId) { }
protected AttributeAliasEventId NewAttributeAliasEventId(string code) { var stateEventId = new AttributeAliasEventId(this.AttributeEventId.AttributeId, code, this.AttributeEventId.Version); return(stateEventId); }
private AttributeAliasStateRemoved NewAttributeAliasStateRemoved(AttributeAliasEventId stateEventId) { return(new AttributeAliasStateRemoved(stateEventId)); }
private AttributeAliasStateMergePatched NewAttributeAliasStateMergePatched(AttributeAliasEventId stateEventId) { return(new AttributeAliasStateMergePatched(stateEventId)); }