public OpaqueResources Deserialise(TlvReader reader)
 {
     OpaqueResources result = null;
     if (reader.TlvRecord == null)
         reader.Read();
     if (reader.TlvRecord != null)
     {
         if (reader.TlvRecord.TypeIdentifier == TTlvTypeIdentifier.MultipleResources)
         {
             result = new OpaqueResources(reader.TlvRecord.Identifier.ToString());
             if (reader.TlvRecord.Value != null)
             {
                 using (TlvReader childReader = new TlvReader(reader.TlvRecord.Value))
                 {
                     while (childReader.Read())
                     {
                         if (childReader.TlvRecord.TypeIdentifier == TTlvTypeIdentifier.ResourceInstance)
                         {
                             OpaqueResource childResource = new OpaqueResource(childReader.TlvRecord.Identifier.ToString());
                             childResource.Value = childReader.TlvRecord.Value;
                             result.Add(childResource);
                         }
                     }
                 }
             }
         }
     }
     return result;
 }
示例#2
0
        public OpaqueResources Deserialise(TlvReader reader)
        {
            OpaqueResources result = null;

            if (reader.TlvRecord == null)
            {
                reader.Read();
            }
            if (reader.TlvRecord != null)
            {
                if (reader.TlvRecord.TypeIdentifier == TTlvTypeIdentifier.MultipleResources)
                {
                    result = new OpaqueResources(reader.TlvRecord.Identifier.ToString());
                    if (reader.TlvRecord.Value != null)
                    {
                        using (TlvReader childReader = new TlvReader(reader.TlvRecord.Value))
                        {
                            while (childReader.Read())
                            {
                                if (childReader.TlvRecord.TypeIdentifier == TTlvTypeIdentifier.ResourceInstance)
                                {
                                    OpaqueResource childResource = new OpaqueResource(childReader.TlvRecord.Identifier.ToString());
                                    childResource.Value = childReader.TlvRecord.Value;
                                    result.Add(childResource);
                                }
                            }
                        }
                    }
                }
            }
            return(result);
        }