| 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 } |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 // Convenience method to avoid having to repeat the same code multiple t
imes in the above | 93 // Convenience method to avoid having to repeat the same code multiple t
imes in the above |
| 93 // dictionary initialization. | 94 // dictionary initialization. |
| 94 private static void MergeWrapperField(JsonParser parser, IMessage messag
e, JsonTokenizer tokenizer) | 95 private static void MergeWrapperField(JsonParser parser, IMessage messag
e, JsonTokenizer tokenizer) |
| 95 { | 96 { |
| 96 parser.MergeField(message, message.Descriptor.Fields[WrappersReflect
ion.WrapperValueFieldNumber], tokenizer); | 97 parser.MergeField(message, message.Descriptor.Fields[WrappersReflect
ion.WrapperValueFieldNumber], tokenizer); |
| 97 } | 98 } |
| 98 | 99 |
| 99 /// <summary> | 100 /// <summary> |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 /// <param name="recursionLimit">The maximum depth of messages to pa
rse</param> | 1010 /// <param name="recursionLimit">The maximum depth of messages to pa
rse</param> |
| 1010 /// <param name="typeRegistry">The type registry used to parse <see
cref="Any"/> messages</param> | 1011 /// <param name="typeRegistry">The type registry used to parse <see
cref="Any"/> messages</param> |
| 1011 public Settings(int recursionLimit, TypeRegistry typeRegistry) | 1012 public Settings(int recursionLimit, TypeRegistry typeRegistry) |
| 1012 { | 1013 { |
| 1013 RecursionLimit = recursionLimit; | 1014 RecursionLimit = recursionLimit; |
| 1014 TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, nam
eof(typeRegistry)); | 1015 TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, nam
eof(typeRegistry)); |
| 1015 } | 1016 } |
| 1016 } | 1017 } |
| 1017 } | 1018 } |
| 1018 } | 1019 } |
| OLD | NEW |