private void SetAttributeByAttributeAttribute(MemberInfo memberInfo, TAttribute a) { AttributeAttribute aa = GetAttributeAttribute(memberInfo); if (aa != null) { if (!String.IsNullOrEmpty(aa.Description)) { a.Description = aa.Description; } if (!String.IsNullOrEmpty(aa.AttributeValueType)) { a.AttributeValueType = aa.AttributeValueType; } a.Active = aa.IsActive; //a.IsInstanceAttribute = aa.IsInstanceAttribute; // //////////////////////////// if (aa.Aliases != null) { foreach (var aaa in aa.Aliases) { ICreateAttributeAlias alias = a.NewCreateAttributeAlias(); alias.Code = aaa; alias.Name = aaa; a.Aliases.Add(alias); } } } }
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... ////////////////////////////
void ICreateAttributeAliasCommands.Remove(ICreateAttributeAlias c) { _innerCommands.Remove((CreateAttributeAliasDto)c); }
void ICreateAttributeAliasCommands.Add(ICreateAttributeAlias c) { _innerCommands.Add((CreateAttributeAliasDto)c); }
public void Remove(ICreateAttributeAlias c) { _innerCommands.Remove(c); }
public void Add(ICreateAttributeAlias c) { _innerCommands.Add(c); }