Exemplo n.º 1
0
 public RpcAcceptedReplyHeader(XdrDataReader reader)
 {
     Verifier = new RpcAuthentication(reader);
     AcceptStatus = (RpcAcceptStatus)reader.ReadInt32();
     if (AcceptStatus == RpcAcceptStatus.ProgramVersionMismatch)
     {
         MismatchInfo = new RpcMismatchInfo(reader);
     }
 }
Exemplo n.º 2
0
 public RpcAcceptedReplyHeader(XdrDataReader reader)
 {
     Verifier     = new RpcAuthentication(reader);
     AcceptStatus = (RpcAcceptStatus)reader.ReadInt32();
     if (AcceptStatus == RpcAcceptStatus.ProgramVersionMismatch)
     {
         MismatchInfo = new RpcMismatchInfo(reader);
     }
 }
Exemplo n.º 3
0
 public RpcRejectedReplyHeader(XdrDataReader reader)
 {
     Status = (RpcRejectedStatus)reader.ReadInt32();
     if (Status == RpcRejectedStatus.RpcMismatch)
     {
         MismatchInfo = new RpcMismatchInfo(reader);
     }
     else
     {
         AuthenticationStatus = (RpcAuthenticationStatus)reader.ReadInt32();
     }
 }
Exemplo n.º 4
0
 public RpcRejectedReplyHeader(XdrDataReader reader)
 {
     Status = (RpcRejectedStatus)reader.ReadInt32();
     if (Status == RpcRejectedStatus.RpcMismatch)
     {
         MismatchInfo = new RpcMismatchInfo(reader);
     }
     else
     {
         AuthenticationStatus = (RpcAuthenticationStatus)reader.ReadInt32();
     }
 }
        public void RoundTripTest()
        {
            RpcMismatchInfo info = new RpcMismatchInfo()
            {
                High = 1,
                Low  = 2
            };

            RpcMismatchInfo clone = null;

            using (MemoryStream stream = new MemoryStream())
            {
                XdrDataWriter writer = new XdrDataWriter(stream);
                info.Write(writer);

                stream.Position = 0;
                XdrDataReader reader = new XdrDataReader(stream);
                clone = new RpcMismatchInfo(reader);
            }

            Assert.Equal(info, clone);
        }