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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 605 |
606 /// <summary> | 606 /// <summary> |
607 /// Reads a uint32 field value from the stream. | 607 /// Reads a uint32 field value from the stream. |
608 /// </summary> | 608 /// </summary> |
609 public uint ReadUInt32() | 609 public uint ReadUInt32() |
610 { | 610 { |
611 return ReadRawVarint32(); | 611 return ReadRawVarint32(); |
612 } | 612 } |
613 | 613 |
614 /// <summary> | 614 /// <summary> |
615 /// Reads an enum field value from the stream. | 615 /// Reads an enum field value from the stream. If the enum is valid for
type T, |
| 616 /// then the ref value is set and it returns true. Otherwise the unknow
n output |
| 617 /// value is set and this method returns false. |
616 /// </summary> | 618 /// </summary> |
617 public int ReadEnum() | 619 public int ReadEnum() |
618 { | 620 { |
619 // Currently just a pass-through, but it's nice to separate it logic
ally from WriteInt32. | 621 // Currently just a pass-through, but it's nice to separate it logic
ally from WriteInt32. |
620 return (int) ReadRawVarint32(); | 622 return (int) ReadRawVarint32(); |
621 } | 623 } |
622 | 624 |
623 /// <summary> | 625 /// <summary> |
624 /// Reads an sfixed32 field value from the stream. | 626 /// Reads an sfixed32 field value from the stream. |
625 /// </summary> | 627 /// </summary> |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 throw InvalidProtocolBufferException.TruncatedMessage(); | 1268 throw InvalidProtocolBufferException.TruncatedMessage(); |
1267 } | 1269 } |
1268 amountToSkip -= bytesRead; | 1270 amountToSkip -= bytesRead; |
1269 } | 1271 } |
1270 } | 1272 } |
1271 } | 1273 } |
1272 | 1274 |
1273 #endregion | 1275 #endregion |
1274 } | 1276 } |
1275 } | 1277 } |
OLD | NEW |