コード例 #1
0
        UploadSessionLookupError enc.IEncodable <UploadSessionLookupError> .Decode(enc.IDecoder decoder)
        {
            switch (decoder.GetUnionName())
            {
            case "not_found":
                return(NotFound.Instance);

            case "incorrect_offset":
                var incorrectOffset = new UploadSessionOffsetError();
                return(new IncorrectOffset(((enc.IEncodable <UploadSessionOffsetError>)incorrectOffset).Decode(decoder)));

            case "closed":
                return(Closed.Instance);

            default:
                return(Other.Instance);
            }
        }
コード例 #2
0
 /// <summary>
 /// <para>Initializes a new instance of the <see cref="IncorrectOffset" />
 /// class.</para>
 /// </summary>
 /// <param name="value">The value</param>
 public IncorrectOffset(UploadSessionOffsetError value)
 {
     this.Value = value;
 }