예제 #1
0
 private void processReply(System.ServiceModel.Channels.Message reply)
 {
     System.Diagnostics.Debug.Assert((reply != null));
     if (reply.IsFault)
     {
         System.Xml.XmlDictionaryReader reader = reply.GetReaderAtBodyContents();
         try
         {
             throw new CFFaultException(reader.ReadOuterXml());
         }
         finally
         {
             reader.Close();
         }
     }
 }
예제 #2
0
 void Load()
 {
     using (System.Xml.XmlDictionaryReader jsonreader = System.Runtime.Serialization.Json.JsonReaderWriterFactory
                                                        .CreateJsonReader(this.JSONByte, new System.Xml.XmlDictionaryReaderQuotas()))
     {
         try
         {
             if (jsonreader == null)
             {
                 throw new Exception(string.Format("JsonUtil.Load(). {0}", "failed to load"));
             }
             ReadyRead(jsonreader);
         }
         finally
         {
             jsonreader.Close();
         }
     }
 }