Exemplo n.º 1
0
        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);
                    }
                }
            }
        }
Exemplo n.º 2
0
        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... ////////////////////////////
Exemplo n.º 3
0
 void ICreateAttributeAliasCommands.Remove(ICreateAttributeAlias c)
 {
     _innerCommands.Remove((CreateAttributeAliasDto)c);
 }
Exemplo n.º 4
0
 void ICreateAttributeAliasCommands.Add(ICreateAttributeAlias c)
 {
     _innerCommands.Add((CreateAttributeAliasDto)c);
 }
Exemplo n.º 5
0
 public void Remove(ICreateAttributeAlias c)
 {
     _innerCommands.Remove(c);
 }
Exemplo n.º 6
0
 public void Add(ICreateAttributeAlias c)
 {
     _innerCommands.Add(c);
 }