protected BTypeValuesXmlSerializerBase(BTypeValuesXmlParams <T> @params, Collections.BTypeValuesBase <T> list) : base(@params)
        {
            Contract.Requires <ArgumentNullException>(@params != null);
            Contract.Requires <ArgumentNullException>(list != null);

            mList = list;
        }
        public BTypeValuesSingleAttrHackXmlSerializer(BTypeValuesXmlParams <float> @params, Collections.BTypeValuesSingle list, string attributeName)
            : base(@params, list)
        {
            Contract.Requires <ArgumentNullException>(@params != null);
            Contract.Requires <ArgumentNullException>(list != null);
            Contract.Requires <ArgumentNullException>(attributeName != null);

            kAttrName = attributeName;
        }
 public BTypeValuesInt32XmlSerializer(BTypeValuesXmlParams <int> @params, Collections.BTypeValuesInt32 list) : base(@params, list)
 {
     Contract.Requires <ArgumentNullException>(@params != null);
     Contract.Requires <ArgumentNullException>(list != null);
 }
        public static void Serialize <TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s,
                                                     Collections.BTypeValuesInt32 list, BTypeValuesXmlParams <int> @params)
            where TDoc : class
            where TCursor : class
        {
            Contract.Requires(s != null);
            Contract.Requires(list != null);
            Contract.Requires(@params != null);

            using (var xs = new BTypeValuesInt32XmlSerializer(@params, list))
            {
                xs.Serialize(s);
            }
        }
Пример #5
0
        public static void Serialize <TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s,
                                                     Collections.BTypeValuesSingle list, BTypeValuesXmlParams <float> @params,
                                                     string attrName = null)
            where TDoc : class
            where TCursor : class
        {
            Contract.Requires(s != null);
            Contract.Requires(list != null);
            Contract.Requires(@params != null);

            BTypeValuesXmlSerializerBase <float> xs;

            if (attrName == null)
            {
                xs = new BTypeValuesSingleXmlSerializer(@params, list);
            }
            else
            {
                xs = new BTypeValuesSingleAttrHackXmlSerializer(@params, list, attrName);
            }

            using (xs)
            {
                xs.Serialize(s);
            }
        }
Пример #6
0
        public static void Serialize <T, TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s,
                                                        Collections.BTypeValues <T> list, BTypeValuesXmlParams <T> @params)
            where T : IEqualityComparer <T>, IO.ITagElementStringNameStreamable, new()
            where TDoc : class
            where TCursor : class
        {
            Contract.Requires(s != null);
            Contract.Requires(list != null);
            Contract.Requires(@params != null);

            using (var xs = new BTypeValuesXmlSerializer <T>(@params, list))
            {
                xs.Serialize(s);
            }
        }