Esempio n. 1
0
        public void Serialize(Stream serializationStream, object graph, Header[] headers)
        {
            if (serializationStream == null)
            {
                throw new ArgumentNullException("serializationStream");
            }
            if (!serializationStream.CanWrite)
            {
                throw new SerializationException("Can't write in the serialization stream");
            }
            if (graph == null)
            {
                throw new ArgumentNullException("graph");
            }
            SoapWriter  soapWriter = new SoapWriter(serializationStream, _selector, _context, _topObject);
            CultureInfo savedCi    = CultureInfo.CurrentCulture;

            try {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                soapWriter.Serialize(graph, headers, _typeFormat, _assemblyFormat);
            }
            finally {
                Thread.CurrentThread.CurrentCulture = savedCi;
            }
        }
Esempio n. 2
0
        public void Serialize(Stream serializationStream, object graph, Header[] headers)
        {
            if (serializationStream == null)
            {
                throw new ArgumentNullException("serializationStream");
            }
            if (!serializationStream.CanWrite)
            {
                throw new SerializationException("Can't write in the serialization stream");
            }
            if (graph == null)
            {
                throw new ArgumentNullException("graph");
            }
            SoapWriter soapWriter = new SoapWriter(serializationStream, _selector, _context, _topObject);

            soapWriter.Serialize(graph, headers, _typeFormat, _assemblyFormat);
        }
Esempio n. 3
0
		public void Serialize(Stream serializationStream, object graph, Header[] headers) {
			if(serializationStream == null)
				throw new ArgumentNullException("serializationStream");
			if(!serializationStream.CanWrite)
				throw new SerializationException("Can't write in the serialization stream");
			if(graph == null)
				throw new ArgumentNullException("graph");
			SoapWriter soapWriter = new SoapWriter(serializationStream, _selector, _context, _topObject);
			CultureInfo savedCi = CultureInfo.CurrentCulture;
			try {
				Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
				soapWriter.Serialize (graph, headers, _typeFormat, _assemblyFormat);
			}
			finally {
				Thread.CurrentThread.CurrentCulture = savedCi;
			}
			
		}
Esempio n. 4
0
		public void Serialize(Stream serializationStream, object graph, Header[] headers) {
			if(serializationStream == null)
				throw new ArgumentNullException("serializationStream");
			if(!serializationStream.CanWrite)
				throw new SerializationException("Can't write in the serialization stream");
			if(graph == null)
				throw new ArgumentNullException("graph");
			SoapWriter soapWriter = new SoapWriter(serializationStream, _selector, _context, _topObject);
			soapWriter.Serialize (graph, headers, _typeFormat, _assemblyFormat);
		}