public static OperationResult Decode(XdrDataInputStream stream)
        {
            OperationResult     decodedOperationResult = new OperationResult();
            OperationResultCode discriminant           = OperationResultCode.Decode(stream);

            decodedOperationResult.Discriminant = discriminant;
            switch (decodedOperationResult.Discriminant.InnerValue)
            {
            case OperationResultCode.OperationResultCodeEnum.opINNER:
                decodedOperationResult.Tr = OperationResultTr.Decode(stream);
                break;

            default:
                break;
            }
            return(decodedOperationResult);
        }
 public static void Encode(XdrDataOutputStream stream, OperationResultCode value)
 {
     stream.WriteInt((int)value.InnerValue);
 }