System.Xml.Schema.XmlSchemaInference.CreateNewElementforChoice C# (CSharp) Méthode

CreateNewElementforChoice() private méthode

private CreateNewElementforChoice ( XmlSchemaElement copyElement ) : XmlSchemaElement
copyElement XmlSchemaElement
Résultat XmlSchemaElement
            XmlSchemaElement CreateNewElementforChoice(XmlSchemaElement copyElement) 
            {
                XmlSchemaElement newElement = new XmlSchemaElement();
                newElement.Annotation = copyElement.Annotation;
                newElement.Block = copyElement.Block;
                newElement.DefaultValue = copyElement.DefaultValue;
                newElement.Final = copyElement.Final;
                newElement.FixedValue = copyElement.FixedValue;
                newElement.Form = copyElement.Form;
                newElement.Id = copyElement.Id;
                //                newElement.IsAbstract = copyElement.IsAbstract;
                if (copyElement.IsNillable) 
                {
                    newElement.IsNillable = copyElement.IsNillable;
                }
                newElement.LineNumber = copyElement.LineNumber;
                newElement.LinePosition = copyElement.LinePosition;
                newElement.Name = copyElement.Name;
                newElement.Namespaces = copyElement.Namespaces;
                newElement.RefName = copyElement.RefName;
                newElement.SchemaType = copyElement.SchemaType;
                newElement.SchemaTypeName = copyElement.SchemaTypeName;
                newElement.SourceUri = copyElement.SourceUri;
                newElement.SubstitutionGroup = copyElement.SubstitutionGroup;
                newElement.UnhandledAttributes = copyElement.UnhandledAttributes;
                if (copyElement.MinOccurs != Decimal.One && this.Occurrence == InferenceOption.Relaxed) 
                {
                    newElement.MinOccurs = copyElement.MinOccurs;
                }
                if (copyElement.MaxOccurs != Decimal.One) {
                    newElement.MaxOccurs = copyElement.MaxOccurs;
                }
                return newElement;
            }