コード例 #1
0
        public ElementBinding Add(Document document, ElementBindingData elementBindingData)
        {
            if (document == null || elementBindingData == null)
            {
                return(null);
            }

            return(Add(document, elementBindingData.Name, elementBindingData.BuiltInCategories, elementBindingData.BuiltInParameterGroup, elementBindingData.Instance));
        }
コード例 #2
0
        public ElementBindingData(ElementBindingData elementBindingData)
        {
            if (elementBindingData != null)
            {
                name = elementBindingData.name;
                if (elementBindingData.builtInCategories != null)
                {
                    builtInCategories = new HashSet <BuiltInCategory>();
                    foreach (BuiltInCategory builtInCategory in elementBindingData.builtInCategories)
                    {
                        builtInCategories.Add(builtInCategory);
                    }
                }

                builtInParameterGroup = elementBindingData.builtInParameterGroup;
                instance = elementBindingData.instance;
            }
        }