NewTOAPIA.Net.Rtp.SdesData.ReadDataFromBuffer C# (CSharp) Method

ReadDataFromBuffer() public method

Deserializes the provided buffer into this object
public ReadDataFromBuffer ( BufferChunk buffer ) : void
buffer BufferChunk
return void
        public override void ReadDataFromBuffer(BufferChunk buffer)
        {
            SDESType type;

            while ((type = (SDESType)buffer.NextByte()) != SDESType.END)
            {
                switch (type)
                {
                    case SDESType.CNAME:
                    case SDESType.EMAIL:
                    case SDESType.LOC:
                    case SDESType.NAME:
                    case SDESType.NOTE:
                    case SDESType.PHONE:
                    case SDESType.TOOL:
                        ReadPropertyFromBuffer((int)type, buffer);
                        break;

                    case SDESType.PRIV:
                        ReadPrivatePropertyFromBuffer(buffer);
                        break;

                    default:
                        throw new ApplicationException(string.Format(CultureInfo.CurrentCulture,
                            Strings.UnexpectedSDESType, type));
                }
            }
        }