/// <summary> /// Parse the service location. /// </summary> /// <param name="byteData">The MPEG2 section containing the service location.</param> /// <param name="index">Index of the first byte of the service location in the MPEG2 section.</param> public void Process(byte[] byteData, int index) { lastIndex = index; try { componentIDTag = Utils.GetBytes(byteData, lastIndex, 4); lastIndex += 4; componentDataLength = Utils.Convert4BytesToInt(byteData, lastIndex); lastIndex += 4; serviceDomainLength = (int)byteData[lastIndex]; lastIndex++; serviceDomain = Utils.GetBytes(byteData, lastIndex, serviceDomainLength); lastIndex += serviceDomainLength; cosNamingName = new CosNamingName(); cosNamingName.Process(byteData, lastIndex); lastIndex += cosNamingName.Index; Validate(); } catch (IndexOutOfRangeException) { throw (new ArgumentOutOfRangeException("The DSM Service Location message is short")); } }