示例#1
0
        public ShadowAttributes(ShadowContainer container, object memberKey)
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            if (memberKey == null)
            {
                throw new ArgumentNullException("memberKey");
            }

            this.container = container;
            this.memberKey = memberKey;
        }
示例#2
0
        internal void CopyTo(ShadowContainer copy)
        {
            copy.id             = id;
            copy.isIdentifiable = isIdentifiable;

            if (attachedAttributesPerKey != null)
            {
                copy.attachedAttributesPerKey = new Dictionary <object, ShadowAttributes>();
                foreach (var keyValue in attachedAttributesPerKey)
                {
                    copy.attachedAttributesPerKey.Add(keyValue.Key, keyValue.Value.Clone());
                }
            }
        }
示例#3
0
        public ShadowContainer Clone()
        {
            if (attachedAttributesPerKey == null)
            {
                return(null);
            }

            var container = new ShadowContainer();

            container.attachedAttributesPerKey = new Dictionary <object, ShadowAttributes>();
            foreach (var keyValue in attachedAttributesPerKey)
            {
                container.attachedAttributesPerKey.Add(keyValue.Key, keyValue.Value.Clone());
            }

            return(container);
        }
示例#4
0
        public ShadowContainer Clone()
        {
            if (attachedAttributesPerKey == null)
            {
                return null;
            }

            var container = new ShadowContainer();
            
            container.attachedAttributesPerKey = new Dictionary<object, ShadowAttributes>();
            foreach (var keyValue in attachedAttributesPerKey)
            {
                container.attachedAttributesPerKey.Add(keyValue.Key, keyValue.Value.Clone());
            }

            return container;
        }
示例#5
0
        internal void CopyTo(ShadowContainer copy)
        {
            copy.id = id;
            copy.isIdentifiable = isIdentifiable;

            if (attachedAttributesPerKey != null)
            {
                copy.attachedAttributesPerKey = new Dictionary<object, ShadowAttributes>();
                foreach (var keyValue in attachedAttributesPerKey)
                {
                    copy.attachedAttributesPerKey.Add(keyValue.Key, keyValue.Value.Clone());
                }
            }
        }
示例#6
0
 public ShadowContainer Clone()
 {
     var container = new ShadowContainer(this);
     return container;
 }
示例#7
0
 public ShadowContainer(ShadowContainer copy)
 {
     copy.CopyTo(this);
 }
示例#8
0
        public ShadowContainer Clone()
        {
            var container = new ShadowContainer(this);

            return(container);
        }
示例#9
0
 public ShadowContainer(ShadowContainer copy)
 {
     copy.CopyTo(this);
 }