當前位置: 首頁>>代碼示例>>C#>>正文


C# ProtoReader.ReadString方法代碼示例

本文整理匯總了C#中ProtoBuf.ProtoReader.ReadString方法的典型用法代碼示例。如果您正苦於以下問題:C# ProtoReader.ReadString方法的具體用法?C# ProtoReader.ReadString怎麽用?C# ProtoReader.ReadString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ProtoBuf.ProtoReader的用法示例。


在下文中一共展示了ProtoReader.ReadString方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ReadNetObject

        /// <summary>
        /// Reads an *implementation specific* bundled .NET object, including (as options) type-metadata, identity/re-use, etc.
        /// </summary>
        public static object ReadNetObject(object value, ProtoReader source, int key, Type type, NetObjectOptions options)
        {
#if FEAT_IKVM
            throw new NotSupportedException();
#else
            SubItemToken token = ProtoReader.StartSubItem(source);
            int fieldNumber;
            int newObjectKey = -1, newTypeKey = -1, tmp;
            while ((fieldNumber = source.ReadFieldHeader()) > 0)
            {
                switch (fieldNumber)
                {
                    case FieldExistingObjectKey:
                        tmp = source.ReadInt32();
                        value = source.NetCache.GetKeyedObject(tmp);
                        break;
                    case FieldNewObjectKey:
                        newObjectKey = source.ReadInt32();
                        break;
                    case FieldExistingTypeKey:
                        tmp = source.ReadInt32();
                        type = (Type)source.NetCache.GetKeyedObject(tmp);
                        key = source.GetTypeKey(ref type);
                        break;
                    case FieldNewTypeKey:
                        newTypeKey = source.ReadInt32();
                        break;
                    case FieldTypeName:
                        string typeName = source.ReadString();
                        type = source.DeserializeType(typeName);
                        if(type == null)
                        {
                            throw new ProtoException("Unable to resolve type: " + typeName + " (you can use the TypeModel.DynamicTypeFormatting event to provide a custom mapping)");
                        }
                        if (type == typeof(string))
                        {
                            key = -1;
                        }
                        else
                        {
                            key = source.GetTypeKey(ref type);
                            if (key < 0)
                                throw new InvalidOperationException("Dynamic type is not a contract-type: " + type.Name);
                        }
                        break;
                    case FieldObject:
                        bool isString = type == typeof(string);
                        bool wasNull = value == null;
                        bool lateSet = wasNull && (isString || ((options & NetObjectOptions.LateSet) != 0));
                        
                        if (newObjectKey >= 0 && !lateSet)
                        {
                            if (value == null)
                            {
                                source.TrapNextObject(newObjectKey);
                            }
                            else
                            {
                                source.NetCache.SetKeyedObject(newObjectKey, value);
                            }
                            if (newTypeKey >= 0) source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        object oldValue = value;
                        if (isString)
                        {
                            value = source.ReadString();
                        }
                        else
                        {
                            value = ProtoReader.ReadTypedObject(oldValue, key, source, type);
                        }
                        
                        if (newObjectKey >= 0)
                        {
                            if(wasNull && !lateSet)
                            { // this both ensures (via exception) that it *was* set, and makes sure we don't shout
                                // about changed references
                                oldValue = source.NetCache.GetKeyedObject(newObjectKey);
                            }
                            if (lateSet)
                            {
                                source.NetCache.SetKeyedObject(newObjectKey, value);
                                if (newTypeKey >= 0) source.NetCache.SetKeyedObject(newTypeKey, type);
                            }
                        }
                        if (newObjectKey >= 0 && !lateSet && !ReferenceEquals(oldValue, value))
                        {
                            throw new ProtoException("A reference-tracked object changed reference during deserialization");
                        }
                        if (newObjectKey < 0 && newTypeKey >= 0)
                        {  // have a new type, but not a new object
                            source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        break;
                    default:
                        source.SkipField();
                        break;
//.........這裏部分代碼省略.........
開發者ID:tsuixl,項目名稱:Frame,代碼行數:101,代碼來源:BclHelpers.cs

示例2: BuildBody


//.........這裏部分代碼省略.........
                .Replace("GC", string.Empty)
                .Replace("k_", string.Empty)
                .Replace("ESOMsg", string.Empty)
                .TrimStart('_')
                .Replace("EMsg", string.Empty);

            
            if ( typeMsgName == "Create" || typeMsgName == "Destroy" || typeMsgName == "Update" )
                typeMsgName = "SingleObject";
            else if ( typeMsgName == "Multiple" )
                typeMsgName = "MultipleObjects";

            var possibleTypes = from type in typeof( CMClient ).Assembly.GetTypes()
                                from typePrefix in gcMsgPossibleTypePrefixes
                                where type.GetInterfaces().Contains( typeof ( IExtensible ) )
                                where type.FullName.StartsWith( typePrefix ) && type.FullName.EndsWith( typeMsgName )
                                select type;

            foreach ( var type in possibleTypes )
            {
                var streamPos = str.Position;
                try
                {
                    return Deserialize( type, str );
                }
                catch ( Exception )
                {
                    str.Position = streamPos;
                }
            }

            if (!MsgUtil.IsProtoBuf(realEMsg))
                return null;

            // try reading it as a protobuf
            using (ProtoReader reader = new ProtoReader(str, null, null))
            {
                var fields = new Dictionary<int, List<object>>();

                while(true)
                {
                    int field = reader.ReadFieldHeader();

                    if(field == 0)
                        break;

                    object fieldValue = null;

                    switch (reader.WireType)
                    {
                        case WireType.Variant:
                        case WireType.Fixed32:
                        case WireType.Fixed64:
                        case WireType.SignedVariant:
                            {
                                try
                                {
                                    fieldValue = reader.ReadInt64();
                                }
                                catch (Exception)
                                {
                                    fieldValue = "Unable to read Variant (debugme)";
                                }

                                break;
                            }
                        case WireType.String:
                            {
                                try
                                {
                                    fieldValue = reader.ReadString();
                                }
                                catch (Exception)
                                {
                                    fieldValue = "Unable to read String (debugme)";
                                }

                                break;
                            }
                        default:
                            {
                                fieldValue = string.Format( "{0} is not implemented", reader.WireType );
                                break;
                            }
                    }

                    if ( !fields.ContainsKey( field ) )
                    {
                        fields[ field ] = new List<object>();
                    }

                    fields[ field ].Add( fieldValue );
                }

                if (fields.Count > 0)
                    return fields;
            }

            return null;
        }
開發者ID:Klumb3r,項目名稱:SteamKit,代碼行數:101,代碼來源:SessionForm.cs

示例3: ReadNetObject

        /// <summary>
        /// Reads an *implementation specific* bundled .NET object, including (as options) type-metadata, identity/re-use, etc.
        /// </summary>
        public static object ReadNetObject(object value, ProtoReader source, int key, Type type, NetObjectOptions options)
        {
            SubItemToken token = ProtoReader.StartSubItem(source);
            int fieldNumber;
            int newObjectKey = -1, newTypeKey = -1, tmp;
            while ((fieldNumber = source.ReadFieldHeader()) > 0)
            {
                switch (fieldNumber)
                {
                    case FieldExistingObjectKey:
                        tmp = source.ReadInt32();
                        value = source.NetCache.GetKeyedObject(tmp);
                        break;
                    case FieldNewObjectKey:
                        newObjectKey = source.ReadInt32();
                        break;
                    case FieldExistingTypeKey:
                        tmp = source.ReadInt32();
                        type = (Type)source.NetCache.GetKeyedObject(tmp);
                        key = source.GetTypeKey(ref type);
                        break;
                    case FieldNewTypeKey:
                        newTypeKey = source.ReadInt32();
                        break;
                    case FieldTypeName:
                        string typeName = source.ReadString();
                        type = source.DeserializeType(typeName);
                        if(type == null)
                        {
                            throw new ProtoException("Unable to resolve type: " + typeName + " (you can use the TypeModel.DynamicTypeFormatting event to provide a custom mapping)");
                        }
                        key = source.GetTypeKey(ref type);
                        if(key < 0) throw new InvalidOperationException("Dynamic type is not a contract-type: " + type.Name);
                        break;
                    case FieldObject:
                        bool isString = type == typeof(string);
                        bool lateSet = value == null && isString;
                        if (value == null && !lateSet)
                        {
                            try
                            {
                                value = ((options & NetObjectOptions.UseConstructor) == 0)
                                            ? BclHelpers.GetUninitializedObject(type)
                                            : (type.IsArray || type.IsInterface ? null : Activator.CreateInstance(type, true));
                            } catch (Exception ex)
                            {
                                throw new ProtoException("Unable to create type " + (type == null ? "<null>" : type.FullName) + ": " + ex.Message, ex);
                            }
                        }
                        if (newObjectKey >= 0 && !lateSet)
                        {
                            source.NetCache.SetKeyedObject(newObjectKey, value);
                            if (newTypeKey >= 0) source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        object oldValue = value;
                        if (isString)
                        {
                            value = source.ReadString();
                        }
                        else
                        {
                            value = ProtoReader.ReadTypedObject(oldValue, key, source, type);
                        }
                        
                        if (newObjectKey >= 0 && lateSet)
                        {
                            source.NetCache.SetKeyedObject(newObjectKey, value);
                            if (newTypeKey >= 0) source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        if (newObjectKey >= 0 && !lateSet && !ReferenceEquals(oldValue, value) && type.FullName.StartsWith("System.Collections.Generic.Dictionary`2"))
                        {
                            throw new ProtoException("A reference-tracked object changed reference during deserialization");
                        }
                        if (newObjectKey < 0 && newTypeKey >= 0)
                        {  // have a new type, but not a new object
                            source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        break;
                    default:
                        source.SkipField();
                        break;
                }
            }
            if(newObjectKey >= 0 && (options & NetObjectOptions.AsReference) == 0)
            {
                throw new ProtoException("Object key in input stream, but reference-tracking was not expected");
            }
            ProtoReader.EndSubItem(token, source);

            return value;
        }
開發者ID:JayCap,項目名稱:Protobuf-net-Patch-and-T4-TypeModel-Generator,代碼行數:94,代碼來源:BclHelpers.cs

示例4: ReadNetObject

 public static object ReadNetObject(object value, ProtoReader source, int key, Type type, BclHelpers.NetObjectOptions options)
 {
     SubItemToken token = ProtoReader.StartSubItem(source);
     int num = -1;
     int num2 = -1;
     int num3;
     while ((num3 = source.ReadFieldHeader()) > 0)
     {
         switch (num3)
         {
         case 1:
         {
             int key2 = source.ReadInt32();
             value = source.NetCache.GetKeyedObject(key2);
             continue;
         }
         case 2:
             num = source.ReadInt32();
             continue;
         case 3:
         {
             int key2 = source.ReadInt32();
             type = (Type)source.NetCache.GetKeyedObject(key2);
             key = source.GetTypeKey(ref type);
             continue;
         }
         case 4:
             num2 = source.ReadInt32();
             continue;
         case 8:
         {
             string text = source.ReadString();
             type = source.DeserializeType(text);
             if (type == null)
             {
                 throw new ProtoException("Unable to resolve type: " + text + " (you can use the TypeModel.DynamicTypeFormatting event to provide a custom mapping)");
             }
             if (type == typeof(string))
             {
                 key = -1;
             }
             else
             {
                 key = source.GetTypeKey(ref type);
                 if (key < 0)
                 {
                     throw new InvalidOperationException("Dynamic type is not a contract-type: " + type.Name);
                 }
             }
             continue;
         }
         case 10:
         {
             bool flag = type == typeof(string);
             bool flag2 = value == null;
             bool flag3 = flag2 && (flag || (byte)(options & BclHelpers.NetObjectOptions.LateSet) != 0);
             if (num >= 0 && !flag3)
             {
                 if (value == null)
                 {
                     source.TrapNextObject(num);
                 }
                 else
                 {
                     source.NetCache.SetKeyedObject(num, value);
                 }
                 if (num2 >= 0)
                 {
                     source.NetCache.SetKeyedObject(num2, type);
                 }
             }
             object obj = value;
             if (flag)
             {
                 value = source.ReadString();
             }
             else
             {
                 value = ProtoReader.ReadTypedObject(obj, key, source, type);
             }
             if (num >= 0)
             {
                 if (flag2 && !flag3)
                 {
                     obj = source.NetCache.GetKeyedObject(num);
                 }
                 if (flag3)
                 {
                     source.NetCache.SetKeyedObject(num, value);
                     if (num2 >= 0)
                     {
                         source.NetCache.SetKeyedObject(num2, type);
                     }
                 }
             }
             if (num >= 0 && !flag3 && !object.ReferenceEquals(obj, value))
             {
                 throw new ProtoException("A reference-tracked object changed reference during deserialization");
             }
             if (num < 0 && num2 >= 0)
//.........這裏部分代碼省略.........
開發者ID:floatyears,項目名稱:Decrypt,代碼行數:101,代碼來源:BclHelpers.cs

示例5: ReadNetObject

        /// <summary>
        /// Reads an *implementation specific* bundled .NET object, including (as options) type-metadata, identity/re-use, etc.
        /// </summary>
        public static object ReadNetObject(object value, ProtoReader source, int key, Type type, NetObjectOptions options)
        {
            SubItemToken token = ProtoReader.StartSubItem(source);
            int fieldNumber;
            int newObjectKey = -1, newTypeKey = -1, tmp;
            while ((fieldNumber = source.ReadFieldHeader()) > 0)
            {
                switch (fieldNumber)
                {
                    case FieldExistingObjectKey:
                        tmp = source.ReadInt32();
                        value = source.NetCache.GetKeyedObject(tmp);
                        break;
                    case FieldNewObjectKey:
                        newObjectKey = source.ReadInt32();
                        break;
                    case FieldExistingTypeKey:
                        tmp = source.ReadInt32();
                        type = (Type)source.NetCache.GetKeyedObject(tmp);
                        key = source.GetTypeKey(ref type);
                        break;
                    case FieldNewTypeKey:
                        newTypeKey = source.ReadInt32();
                        break;
                    case FieldTypeName:
                        type = source.DeserializeType(source.ReadString());
                        key = source.GetTypeKey(ref type);
                        break;
                    case FieldObject:
                        bool isString = type == typeof(string);
                        bool lateSet = value == null && isString;
                        if (value == null && !lateSet)
                        {
                            value = ((options & NetObjectOptions.UseConstructor) == 0) ? BclHelpers.GetUninitializedObject(type) : Activator.CreateInstance(type);
                        }
                        if (newObjectKey >= 0 && !lateSet)
                        {
                            source.NetCache.SetKeyedObject(newObjectKey, value);
                            if (newTypeKey >= 0) source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        object oldValue = value;
                        if (isString)
                        {
                            value = source.ReadString();
                        }
                        else
                        {
                            value = ProtoReader.ReadTypedObject(oldValue, key, source, type);
                        }

                        if (newObjectKey >= 0 && lateSet)
                        {
                            source.NetCache.SetKeyedObject(newObjectKey, value);
                            if (newTypeKey >= 0) source.NetCache.SetKeyedObject(newTypeKey, type);
                        }
                        if (!lateSet && !ReferenceEquals(oldValue, value))
                        {
                            throw new ProtoException("A reference-tracked object changed reference during deserialization");
                        }
                        break;
                    default:
                        source.SkipField();
                        break;
                }
            }
            ProtoReader.EndSubItem(token, source);

            return value;
        }
開發者ID:helios57,項目名稱:anrl,代碼行數:72,代碼來源:BclHelpers.cs

示例6: ReadField

 object ReadField(ProtoReader reader, Type memberT, string sClassName, CLS_Environment environment)
 {
     if (memberT == typeof(int))
     {
         return reader.ReadInt32();
     }
     else if (memberT == typeof(uint))
     {
         return reader.ReadUInt32();
     }
     else if (memberT == typeof(bool))
     {
         return reader.ReadBoolean();
     }
     else if (memberT == typeof(byte))
     {
         return reader.ReadByte();
     }
     else if (memberT == typeof(sbyte))
     {
         return reader.ReadSByte();
     }
     else if (memberT == typeof(float))
     {
         return reader.ReadSingle();
     }
     else if (memberT == typeof(double))
     {
         return reader.ReadDouble();
     }
     else if (memberT == typeof(short))
     {
         return reader.ReadInt16();
     }
     else if (memberT == typeof(ushort))
     {
         return reader.ReadUInt16();
     }
     else if (memberT == typeof(long))
     {
         return reader.ReadInt64();
     }
     else if (memberT == typeof(ulong))
     {
         return reader.ReadUInt64();
     }
     else if (memberT == typeof(string))
     {
         return reader.ReadString();
     }
     else if (memberT == typeof(byte[]))
     {
         return ProtoReader.AppendBytes(null, reader);
     }
     else if (memberT == typeof(SInstance))
     {
         SubItemToken st = ProtoReader.StartSubItem(reader);
         CLS_Type_Class sClass = environment.GetTypeByKeywordQuiet(sClassName) as CLS_Type_Class;
         if (!sClass.compiled)
             RuntimeCompilerClass(sClassName);
         CLS_Content content = CLS_Content.NewContent(environment);
         CLS_Content.Value retVal = sClass.function.New(content, m_emptyParams);
         CLS_Content.PoolContent(content);
         SInstance sInstance = (SInstance)retVal.value;
         ReadSInstance(reader, sInstance, environment);
         ProtoReader.EndSubItem(st, reader);
         return sInstance;
     }
     else
     {
         throw new NotImplementedException("未實現類型: " + memberT);
     }
 }
開發者ID:wpszz,項目名稱:CSLightForUnity,代碼行數:73,代碼來源:CSLightMng_ProtoBuf.cs

示例7: BuildBody


//.........這裏部分代碼省略.........

                var gcMsg = Activator.CreateInstance( type ) as ISteamSerializableMessage;

                return gcMsg.GetEMsg() == eMsg;
            } );

            string eMsgName = eMsg.ToString();

            eMsgName = eMsgName.Replace( "Econ", "" ).Replace( "AM", "" );

            // check name
            if ( msgType == null )
                msgType = GetSteamKitType( string.Format( "SteamKit2.Msg{0}", eMsgName ) );


            if ( msgType != null )
            {
                var body = Activator.CreateInstance( msgType ) as ISteamSerializableMessage;
                body.Deserialize( str );

                return body;
            }

            msgType = GetSteamKitType( string.Format( "SteamKit2.CMsg{0}", eMsgName ) );
            if ( msgType != null )
            {
                return Deserialize( msgType, str );
            }

            if ( eMsg == EMsg.ClientToGC || eMsg == EMsg.ClientFromGC )
            {
                return Serializer.Deserialize<CMsgGCClient>( str );
            }

            // try reading it as a protobuf
            using (ProtoReader reader = new ProtoReader(str, null, null))
            {
                var fields = new Dictionary<int, List<object>>();

                while(true)
                {
                    int field = reader.ReadFieldHeader();

                    if(field == 0)
                        break;

                    object fieldValue = null;

                    switch (reader.WireType)
                    {
                        case WireType.Variant:
                        case WireType.Fixed32:
                        case WireType.Fixed64:
                        case WireType.SignedVariant:
                            {
                                try
                                {
                                    fieldValue = reader.ReadInt64();
                                }
                                catch (Exception)
                                {
                                    fieldValue = "Unable to read Variant (debugme)";
                                }

                                break;
                            }
                        case WireType.String:
                            {
                                try
                                {
                                    fieldValue = reader.ReadString();
                                }
                                catch (Exception)
                                {
                                    fieldValue = "Unable to read String (debugme)";
                                }

                                break;
                            }
                        default:
                            {
                                fieldValue = string.Format( "{0} is not implemented", reader.WireType );
                                break;
                            }
                    }

                    if ( !fields.ContainsKey( field ) )
                    {
                        fields[ field ] = new List<object>();
                    }

                    fields[ field ].Add( fieldValue );
                }

                if (fields.Count > 0)
                    return fields;
            }

            return null;
        }
開發者ID:samphippen,項目名稱:steamre,代碼行數:101,代碼來源:SessionForm.cs

示例8: Read

        /// <summary>
        /// The read.
        /// </summary>
        /// <param name="compiledAsset">
        /// The compiled asset.
        /// </param>
        /// <param name="protoReader">
        /// The proto reader.
        /// </param>
        /// <returns>
        /// The <see cref="CompiledAsset"/>.
        /// </returns>
        private static CompiledAsset Read(CompiledAsset compiledAsset, ProtoReader protoReader)
        {
            int num;
            while ((num = protoReader.ReadFieldHeader()) > 0)
            {
                if (num != 1)
                {
                    if (num != 3)
                    {
                        if (compiledAsset == null)
                        {
                            var expr_8A = new CompiledAsset();
                            ProtoReader.NoteObject(expr_8A, protoReader);
                            compiledAsset = expr_8A;
                        }

                        protoReader.SkipField();
                    }
                    else
                    {
                        if (compiledAsset == null)
                        {
                            var expr_4C = new CompiledAsset();
                            ProtoReader.NoteObject(expr_4C, protoReader);
                            compiledAsset = expr_4C;
                        }

                        PlatformData arg_63_0 = compiledAsset.PlatformData;
                        SubItemToken token = ProtoReader.StartSubItem(protoReader);
                        PlatformData arg_6F_0 = Read(arg_63_0, protoReader);
                        ProtoReader.EndSubItem(token, protoReader);
                        PlatformData platformData = arg_6F_0;
                        if (platformData != null)
                        {
                            compiledAsset.PlatformData = platformData;
                        }
                    }
                }
                else
                {
                    if (compiledAsset == null)
                    {
                        var expr_19 = new CompiledAsset();
                        ProtoReader.NoteObject(expr_19, protoReader);
                        compiledAsset = expr_19;
                    }

                    string text = protoReader.ReadString();
                    if (text != null)
                    {
                        compiledAsset.Loader = text;
                    }
                }
            }

            if (compiledAsset == null)
            {
                var expr_B2 = new CompiledAsset();
                ProtoReader.NoteObject(expr_B2, protoReader);
                compiledAsset = expr_B2;
            }

            return compiledAsset;
        }
開發者ID:RedpointGames,項目名稱:Protogame,代碼行數:76,代碼來源:CompiledAssetSerializer.cs

示例9: Read

 private static Product Read(Product product1, ProtoReader reader1)
 {
     int num;
     while ((num = reader1.ReadFieldHeader()) > 0)
     {
         switch (num)
         {
             case 1:
                 if (product1 == null)
                 {
                     product1 = new Product();
                 }
                 product1.ProductID = reader1.ReadInt32();
                 continue;
             case 2:
                 if (product1 == null)
                 {
                     product1 = new Product();
                 }
                 product1.ProductName = reader1.ReadString();
                 continue;
             case 3:
                 if (product1 == null)
                 {
                     product1 = new Product();
                 }
                 product1.SupplierID = new int?(reader1.ReadInt32());
                 continue;
         }
     }
     return product1;
 }
開發者ID:XewTurquish,項目名稱:vsminecraft,代碼行數:32,代碼來源:Program.cs

示例10: ReadProtobuf

        public static Dictionary<int, List<object>> ReadProtobuf(Stream stream)
        {
            // try reading it as a protobuf
            using (var reader = new ProtoReader(stream, null, null))
            {
                var fields = new Dictionary<int, List<object>>();

                while (true)
                {
                    int field = reader.ReadFieldHeader();

                    if (field == 0)
                        break;

                    object fieldValue = null;

                    switch (reader.WireType)
                    {
                        case WireType.Variant:
                        case WireType.Fixed32:
                        case WireType.Fixed64:
                        case WireType.SignedVariant:
                            {
                                try
                                {
                                    fieldValue = reader.ReadInt64();
                                }
                                catch (Exception)
                                {
                                    fieldValue = "Unable to read Variant (debugme)";
                                }

                                break;
                            }
                        case WireType.String:
                            {
                                try
                                {
                                    fieldValue = reader.ReadString();
                                }
                                catch (Exception)
                                {
                                    fieldValue = "Unable to read String (debugme)";
                                }

                                break;
                            }
                        default:
                            {
                                fieldValue = string.Format("{0} is not implemented", reader.WireType);
                                break;
                            }
                    }

                    if (!fields.ContainsKey(field))
                    {
                        fields[field] = new List<object>();
                    }

                    fields[field].Add(fieldValue);
                }

                if (fields.Count > 0)
                    return fields;
            }

            return null;
        }
開發者ID:Zaharkov,項目名稱:SteamKit,代碼行數:68,代碼來源:ProtoBufFieldReader.cs


注:本文中的ProtoBuf.ProtoReader.ReadString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。