BerLib.BerEncoding.DecodeLong C# (CSharp) Method

DecodeLong() public static method

public static DecodeLong ( IBerInput input, int length ) : long
input IBerInput
length int
return long
        public static long DecodeLong(IBerInput input, int length)
        {
            return DecodeLong(input, length, true);
        }

Same methods

BerEncoding::DecodeLong ( IBerInput input, int length, bool isSigned ) : long

Usage Example

Example #1
0
        /// <summary>
        /// Decodes the value of the current TLV a 64bit integer.
        /// Throws an exception in case of a format mismatch.
        /// </summary>
        /// <returns>The integer value of the current TLV.</returns>
        public long GetLong()
        {
            if (IsContainer || Length == 0 || Value == null)
            {
                ThrowError(203, "Invalid Integer encoding");
            }

            Debug.Assert(Value != null || Length == 0);
            Debug.Assert(Type == BerType.Integer || BerType.IsApplicationDefined(Type));

            var input = new BerMemoryInput(Value);

            return(BerEncoding.DecodeLong(input, Length));
        }
All Usage Examples Of BerLib.BerEncoding::DecodeLong