internal XmlEntityTypeBuilder(XmlEntityTypeInfo xmlEntityTypeInfo, XmlModelTypeInfo xmlModelTypeInfo, XmlDataModel xmlModelTypeBuilder)
 {
     _xmlEntityTypeInfo   = xmlEntityTypeInfo;
     _xmlModelTypeInfo    = xmlModelTypeInfo;
     _xmlModelTypeBuilder = xmlModelTypeBuilder;
     _xmlModelTypeBuilder.XmlModelInfo.SerializationTypesKeyedByName[_entityType.Name] = _entityType;
 }
Exemple #2
0
        public XmlModelTypeInfo Copy()
        {
            XmlModelTypeInfo xmlModelTypeInfo = new XmlModelTypeInfo();

            foreach (var xmlEntityTypeInfoByType in EntitiesInfoKeyedByType)
            {
                xmlModelTypeInfo.EntitiesInfoKeyedByType.Add(xmlEntityTypeInfoByType.Key, xmlEntityTypeInfoByType.Value.Copy());
            }
            xmlModelTypeInfo.SerializationTypesKeyedByName.AddRange(SerializationTypesKeyedByName);
            return(xmlModelTypeInfo);
        }
 /// <summary>Initializes a new instance of the <see cref="XmlDataModel"/> class.</summary>
 public XmlDataModel()
 {
     XmlModelInfo = new XmlModelTypeInfo();
     HasKnownEntity <bool>();
     HasKnownEntity <byte>();
     HasKnownEntity <sbyte>();
     HasKnownEntity <char>();
     HasKnownEntity <decimal>();
     HasKnownEntity <double>();
     HasKnownEntity <float>();
     HasKnownEntity <int>();
     HasKnownEntity <uint>();
     HasKnownEntity <long>();
     HasKnownEntity <ulong>();
     HasKnownEntity <object>();
     HasKnownEntity <short>();
     HasKnownEntity <ushort>();
     HasKnownEntity <string>();
 }
        /// <summary>
        /// Creates an independent copy of the current model.
        /// </summary>
        /// <returns>An independent copy of the current model.</returns>
        public XmlDataModel Copy()
        {
            XmlModelTypeInfo xmlModelTypeInfo = XmlModelInfo.Copy();

            return(new XmlDataModel(xmlModelTypeInfo));
        }
 private XmlDataModel(XmlModelTypeInfo xmlModelTypeInfo)
 {
     XmlModelInfo = xmlModelTypeInfo;
 }