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 2008 Google Inc. All rights reserved. | 3 // Copyright 2008 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 16 matching lines...) Expand all Loading... |
27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
31 #endregion | 31 #endregion |
32 | 32 |
33 using System; | 33 using System; |
34 using System.Collections.Generic; | 34 using System.Collections.Generic; |
35 using System.Collections.ObjectModel; | 35 using System.Collections.ObjectModel; |
36 using System.Linq; | 36 using System.Linq; |
| 37 #if DOTNET35 |
| 38 // Needed for ReadOnlyDictionary, which does not exist in .NET 3.5 |
| 39 using Google.Protobuf.Collections; |
| 40 #endif |
37 | 41 |
38 namespace Google.Protobuf.Reflection | 42 namespace Google.Protobuf.Reflection |
39 { | 43 { |
40 /// <summary> | 44 /// <summary> |
41 /// Describes a message type. | 45 /// Describes a message type. |
42 /// </summary> | 46 /// </summary> |
43 public sealed class MessageDescriptor : DescriptorBase | 47 public sealed class MessageDescriptor : DescriptorBase |
44 { | 48 { |
45 private static readonly HashSet<string> WellKnownTypeNames = new HashSet
<string> | 49 private static readonly HashSet<string> WellKnownTypeNames = new HashSet
<string> |
46 { | 50 { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 if (fieldDescriptor == null) | 312 if (fieldDescriptor == null) |
309 { | 313 { |
310 throw new KeyNotFoundException("No such field name"); | 314 throw new KeyNotFoundException("No such field name"); |
311 } | 315 } |
312 return fieldDescriptor; | 316 return fieldDescriptor; |
313 } | 317 } |
314 } | 318 } |
315 } | 319 } |
316 } | 320 } |
317 } | 321 } |
OLD | NEW |