示例#1
0
        public static AvailabilityResponse DeserializeAvailabilityResponse(Stream replyStream)
        {
            AvailabilityResponse availabilityResponse = null;
            XmlReader            inreader             = null;

            if (replyStream != null)
            {
                XmlSerializer xs = new XmlSerializer(typeof(AvailabilityResponse));
                inreader             = new XmlTextReader(replyStream);
                availabilityResponse = (AvailabilityResponse)xs.Deserialize(inreader);
                return(availabilityResponse);
            }
            else
            {
                return(null);
            }
        }
示例#2
0
 static void Main(string[] args)
 {
     Stream stream = File.Open(FILENAME, FileMode.Open);
     AvailabilityResponse availabilityResponse = DeserializeAvailabilityResponse(stream);
 }