Ejemplo n.º 1
0
		public static void SerializeUpdate<TDoc, TCursor>(IO.TagElementStream<TDoc, TCursor, string> s,
			IBListAutoIdXmlSerializer xs, bool forceNoRootElementStreaming = false)
			where TDoc : class
			where TCursor : class
		{
			Contract.Requires(s != null);
			Contract.Requires(xs != null);

			if (forceNoRootElementStreaming) xs.Params.SetForceNoRootElementStreaming(true);
			xs.StreamUpdate(s);
			if (forceNoRootElementStreaming) xs.Params.SetForceNoRootElementStreaming(false);
		}
        public static void Serialize(KSoft.IO.XmlElementStream s, FA mode, BXmlSerializerInterface xsi,
                                     IBListAutoIdXmlSerializer xs, bool forceNoRootElementStreaming = false)
        {
            Contract.Requires(s != null);
            Contract.Requires(xsi != null);
            Contract.Requires(xs != null);
            Contract.Requires(!xs.IsDisposed);

            if (forceNoRootElementStreaming)
            {
                xs.Params.SetForceNoRootElementStreaming(true);
            }
            xs.StreamXml(s, mode, xsi);
            if (forceNoRootElementStreaming)
            {
                xs.Params.SetForceNoRootElementStreaming(false);
            }
        }