Example #1
0
        protected AwaitableAttachment(SerializationInfo info, StreamingContext context)
        {
            // constructor arguments
            var jsonAttachment = default(string);

            SetField.NotNullFrom(out jsonAttachment, nameof(this.attachment), info);
            this.attachment = JsonConvert.DeserializeObject <Attachment>(jsonAttachment);

            this.awaiter = Awaitable.FromSource(this.attachment, this.ResolveFromSourceAsync) as IAwaiter <Stream>;
        }
Example #2
0
 public DialogContext(SerializationInfo info, StreamingContext context)
 {
     SetField.NotNullFrom(out this.botToUser, nameof(botToUser), info);
     SetField.NotNullFrom(out this.data, nameof(data), info);
     SetField.NotNullFrom(out this.fiber, nameof(fiber), info);
 }