Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpedyc.DynamicVCPDU.WriteLength C# (CSharp) Méthode

WriteLength() protected méthode

protected WriteLength ( PduMarshaler marshaler, uint Length ) : void
marshaler PduMarshaler
Length uint
Résultat void
        protected void WriteLength(PduMarshaler marshaler, uint Length)
        {
            //TODO: Refine this method
            switch ((Len_Values)HeaderBits.Sp)
            {
                case Len_Values.OneByte:
                    marshaler.WriteByte(Convert.ToByte(Length));
                    break;
                case Len_Values.TwoBytes:
                    marshaler.WriteUInt16(Convert.ToUInt16(Length));
                    break;
                case Len_Values.FourBytes:
                    marshaler.WriteUInt32(Convert.ToUInt32(Length));
                    break;
                case Len_Values.Invalid:
                default:
                    DynamicVCException.Throw("Len is invalid.");
                    break;
            }
        }