Esempio n. 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");
        }
Esempio n. 2
0
 public static TLObject readTLObject(InputStream stream, TLContext context, Class type) =>
 context.deserializeMessage(stream);
Esempio n. 3
0
 public static TLMethod readTLMethod(InputStream stream, TLContext context) =>
 ((TLMethod)context.deserializeMessage(stream));
Esempio n. 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;
     }
 }