Exemplo n.º 1
0
 public static void Encode(XdrDataOutputStream stream, OperationID encodedOperationID)
 {
     stream.WriteInt((int)encodedOperationID.Discriminant.InnerValue);
     switch (encodedOperationID.Discriminant.InnerValue)
     {
     case EnvelopeType.EnvelopeTypeEnum.ENVELOPE_TYPE_OP_ID:
         OperationIDId.Encode(stream, encodedOperationID.Id);
         break;
     }
 }
Exemplo n.º 2
0
        public static OperationID Decode(XdrDataInputStream stream)
        {
            OperationID  decodedOperationID = new OperationID();
            EnvelopeType discriminant       = EnvelopeType.Decode(stream);

            decodedOperationID.Discriminant = discriminant;
            switch (decodedOperationID.Discriminant.InnerValue)
            {
            case EnvelopeType.EnvelopeTypeEnum.ENVELOPE_TYPE_OP_ID:
                decodedOperationID.Id = OperationIDId.Decode(stream);
                break;
            }
            return(decodedOperationID);
        }