FSSHTTPandWOPIInspector.Parsers.CompactUnsigned64bitInteger.GetUint C# (CSharp) Method

GetUint() public method

get Uint feild in CompactUnsigned64bitInteger structure.
public GetUint ( CompactUnsigned64bitInteger objectVal ) : ulong
objectVal CompactUnsigned64bitInteger
return ulong
        public ulong GetUint(CompactUnsigned64bitInteger objectVal)
        {
            if (objectVal is CompactUintZero)
            {
                return (objectVal as CompactUintZero).Uint;
            }
            else if (objectVal is CompactUint7bitvalues)
            {
                return (objectVal as CompactUint7bitvalues).Uint;
            }
            else if (objectVal is CompactUint14bitvalues)
            {
                return (objectVal as CompactUint14bitvalues).Uint;
            }
            else if (objectVal is CompactUint21bitvalues)
            {
                return (objectVal as CompactUint21bitvalues).Uint;
            }
            else if (objectVal is CompactUint28bitvalues)
            {
                return (objectVal as CompactUint28bitvalues).Uint;
            }
            else if (objectVal is CompactUint35bitvalues)
            {
                return (objectVal as CompactUint35bitvalues).Uint;
            }
            else if (objectVal is CompactUint42bitvalues)
            {
                return (objectVal as CompactUint42bitvalues).Uint;
            }
            else if (objectVal is CompactUint49bitvalues)
            {
                return (objectVal as CompactUint49bitvalues).Uint;
            }
            else if (objectVal is CompactUint64bitvalues)
            {
                return (objectVal as CompactUint64bitvalues).Uint;
            }
            else
            {
                throw new Exception("The CompactUnsigned64bitInteger type is not right.");
            }
        }

Usage Example

 /// <summary>
 /// Parse the StringItem structure.
 /// </summary>
 /// <param name="s">An stream containing StringItem structure.</param>
 public override void Parse(Stream s)
 {
     base.Parse(s);
     this.Count = new CompactUnsigned64bitInteger();
     this.Count = this.Count.TryParse(s);
     this.Content = ReadString(System.Text.Encoding.Unicode, "", (int)Count.GetUint(Count));
 }
All Usage Examples Of FSSHTTPandWOPIInspector.Parsers.CompactUnsigned64bitInteger::GetUint
CompactUnsigned64bitInteger