OLD | NEW |
1 #region Copyright notice and license | 1 #region Copyright notice and license |
2 // Protocol Buffers - Google's data interchange format | 2 // Protocol Buffers - Google's data interchange format |
3 // Copyright 2015 Google Inc. All rights reserved. | 3 // Copyright 2015 Google Inc. All rights reserved. |
4 // https://developers.google.com/protocol-buffers/ | 4 // https://developers.google.com/protocol-buffers/ |
5 // | 5 // |
6 // Redistribution and use in source and binary forms, with or without | 6 // Redistribution and use in source and binary forms, with or without |
7 // modification, are permitted provided that the following conditions are | 7 // modification, are permitted provided that the following conditions are |
8 // met: | 8 // met: |
9 // | 9 // |
10 // * Redistributions of source code must retain the above copyright | 10 // * Redistributions of source code must retain the above copyright |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 { Struct.Descriptor.FullName, (parser, message, tokenizer) => parser
.MergeStruct(message, tokenizer) }, | 79 { Struct.Descriptor.FullName, (parser, message, tokenizer) => parser
.MergeStruct(message, tokenizer) }, |
80 { Any.Descriptor.FullName, (parser, message, tokenizer) => parser.Me
rgeAny(message, tokenizer) }, | 80 { Any.Descriptor.FullName, (parser, message, tokenizer) => parser.Me
rgeAny(message, tokenizer) }, |
81 { FieldMask.Descriptor.FullName, (parser, message, tokenizer) => Mer
geFieldMask(message, tokenizer.Next()) }, | 81 { FieldMask.Descriptor.FullName, (parser, message, tokenizer) => Mer
geFieldMask(message, tokenizer.Next()) }, |
82 { Int32Value.Descriptor.FullName, MergeWrapperField }, | 82 { Int32Value.Descriptor.FullName, MergeWrapperField }, |
83 { Int64Value.Descriptor.FullName, MergeWrapperField }, | 83 { Int64Value.Descriptor.FullName, MergeWrapperField }, |
84 { UInt32Value.Descriptor.FullName, MergeWrapperField }, | 84 { UInt32Value.Descriptor.FullName, MergeWrapperField }, |
85 { UInt64Value.Descriptor.FullName, MergeWrapperField }, | 85 { UInt64Value.Descriptor.FullName, MergeWrapperField }, |
86 { FloatValue.Descriptor.FullName, MergeWrapperField }, | 86 { FloatValue.Descriptor.FullName, MergeWrapperField }, |
87 { DoubleValue.Descriptor.FullName, MergeWrapperField }, | 87 { DoubleValue.Descriptor.FullName, MergeWrapperField }, |
88 { BytesValue.Descriptor.FullName, MergeWrapperField }, | 88 { BytesValue.Descriptor.FullName, MergeWrapperField }, |
89 { StringValue.Descriptor.FullName, MergeWrapperField }, | 89 { StringValue.Descriptor.FullName, MergeWrapperField } |
90 { BoolValue.Descriptor.FullName, MergeWrapperField } | |
91 }; | 90 }; |
92 | 91 |
93 // Convenience method to avoid having to repeat the same code multiple t
imes in the above | 92 // Convenience method to avoid having to repeat the same code multiple t
imes in the above |
94 // dictionary initialization. | 93 // dictionary initialization. |
95 private static void MergeWrapperField(JsonParser parser, IMessage messag
e, JsonTokenizer tokenizer) | 94 private static void MergeWrapperField(JsonParser parser, IMessage messag
e, JsonTokenizer tokenizer) |
96 { | 95 { |
97 parser.MergeField(message, message.Descriptor.Fields[WrappersReflect
ion.WrapperValueFieldNumber], tokenizer); | 96 parser.MergeField(message, message.Descriptor.Fields[WrappersReflect
ion.WrapperValueFieldNumber], tokenizer); |
98 } | 97 } |
99 | 98 |
100 /// <summary> | 99 /// <summary> |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 /// <param name="recursionLimit">The maximum depth of messages to pa
rse</param> | 1009 /// <param name="recursionLimit">The maximum depth of messages to pa
rse</param> |
1011 /// <param name="typeRegistry">The type registry used to parse <see
cref="Any"/> messages</param> | 1010 /// <param name="typeRegistry">The type registry used to parse <see
cref="Any"/> messages</param> |
1012 public Settings(int recursionLimit, TypeRegistry typeRegistry) | 1011 public Settings(int recursionLimit, TypeRegistry typeRegistry) |
1013 { | 1012 { |
1014 RecursionLimit = recursionLimit; | 1013 RecursionLimit = recursionLimit; |
1015 TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, nam
eof(typeRegistry)); | 1014 TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, nam
eof(typeRegistry)); |
1016 } | 1015 } |
1017 } | 1016 } |
1018 } | 1017 } |
1019 } | 1018 } |
OLD | NEW |