예제 #1
0
        public virtual DhGenResult deserializeResponse(InputStream stream, TLContext context)
        {
            TLObject obj2 = context.deserializeMessage(stream);

            if (obj2 == null)
            {
                Throwable.__ <suppressFillInStackTrace>();
                throw new DeserializeException("Unable to deserialize response");
            }
            if (obj2 is DhGenResult)
            {
                return((DhGenResult)obj2);
            }
            Throwable.__ <suppressFillInStackTrace>();
            throw new DeserializeException("Response has incorrect type");
        }
예제 #2
0
 public static TLObject readTLObject(InputStream stream, TLContext context, Class type) =>
 context.deserializeMessage(stream);
예제 #3
0
 public static TLMethod readTLMethod(InputStream stream, TLContext context) =>
 ((TLMethod)context.deserializeMessage(stream));
예제 #4
0
 /**
  * Reading tl-object from stream
  *
  * @param stream  source stream
  * @param context tl-context
  * @return tl-object
  * @throws IOException reading exception
  */
 public static TLObject readTLObject(/*InputStream*/ BufferedStream  stream, TLContext context)
 {
     try {
         return context.deserializeMessage(stream);
     } catch(IOException e) {
         System.Diagnostics.Debug.WriteLine(e.StackTrace);
         throw e;
     }
 }