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

UpdateLengthOfLength() protected méthode

protected UpdateLengthOfLength ( uint length ) : void
length uint
Résultat void
        protected void UpdateLengthOfLength(uint length)
        {
            // TODO: check this logic
            if (length <= Byte.MaxValue)
            {
                HeaderBits.Sp = (int)Len_Values.OneByte;
            }
            else if (length <= UInt16.MaxValue)
            {
                HeaderBits.Sp = (int)Len_Values.TwoBytes;
            }
            else if (length <= UInt32.MaxValue)
            {
                HeaderBits.Sp = (int)Len_Values.FourBytes;
            }
            else
            {
                DynamicVCException.Throw("The field Length is too long.");
            }
        }