コード例 #1
0
        public virtual object Clone()
        {
            NamedCollection namedCollection = (NamedCollection)GetType().GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic)[0].Invoke(new object[2]
            {
                parent,
                common
            });

            namedCollection.parent      = parent;
            namedCollection.common      = common;
            namedCollection.elementType = elementType;
            IEnumerator enumerator = GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    NamedElement namedElement = (NamedElement)((ICloneable)enumerator.Current).Clone();
                    namedCollection.InnerList.Add(namedElement);
                    namedElement.collection = namedCollection;
                }
                return(namedCollection);
            }
            finally
            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
コード例 #2
0
 public DataBindingTargetResolver(FieldCollection fields, SymbolCollection symbols)
     : this(fields)
 {
     items = symbols;
     createNewItemForUnresoved = true;
     newItemsType = typeof(Symbol);
     BindingType  = BindingType.Symbols;
 }
コード例 #3
0
 public DataBindingTargetResolver(FieldCollection fields, PathCollection paths)
     : this(fields)
 {
     items       = paths;
     BindingType = BindingType.Paths;
 }
コード例 #4
0
 public DataBindingTargetResolver(FieldCollection fields, GroupCollection groups)
     : this(fields)
 {
     items       = groups;
     BindingType = BindingType.Groups;
 }
コード例 #5
0
 public DataBindingTargetResolver(FieldCollection fields, ShapeCollection shapes)
     : this(fields)
 {
     items       = shapes;
     BindingType = BindingType.Shapes;
 }