ICodedOutputStream.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using System;
  2. using Google.ProtocolBuffers.Descriptors;
  3. namespace Google.ProtocolBuffers
  4. {
  5. public interface ICodedOutputStream
  6. {
  7. /// <summary>
  8. /// Writes a double field value, including tag, to the stream.
  9. /// </summary>
  10. void WriteDouble(int fieldNumber, string fieldName, double value);
  11. /// <summary>
  12. /// Writes a float field value, including tag, to the stream.
  13. /// </summary>
  14. void WriteFloat(int fieldNumber, string fieldName, float value);
  15. /// <summary>
  16. /// Writes a uint64 field value, including tag, to the stream.
  17. /// </summary>
  18. [CLSCompliant(false)]
  19. void WriteUInt64(int fieldNumber, string fieldName, ulong value);
  20. /// <summary>
  21. /// Writes an int64 field value, including tag, to the stream.
  22. /// </summary>
  23. void WriteInt64(int fieldNumber, string fieldName, long value);
  24. /// <summary>
  25. /// Writes an int32 field value, including tag, to the stream.
  26. /// </summary>
  27. void WriteInt32(int fieldNumber, string fieldName, int value);
  28. /// <summary>
  29. /// Writes a fixed64 field value, including tag, to the stream.
  30. /// </summary>
  31. [CLSCompliant(false)]
  32. void WriteFixed64(int fieldNumber, string fieldName, ulong value);
  33. /// <summary>
  34. /// Writes a fixed32 field value, including tag, to the stream.
  35. /// </summary>
  36. [CLSCompliant(false)]
  37. void WriteFixed32(int fieldNumber, string fieldName, uint value);
  38. /// <summary>
  39. /// Writes a bool field value, including tag, to the stream.
  40. /// </summary>
  41. void WriteBool(int fieldNumber, string fieldName, bool value);
  42. /// <summary>
  43. /// Writes a string field value, including tag, to the stream.
  44. /// </summary>
  45. void WriteString(int fieldNumber, string fieldName, string value);
  46. /// <summary>
  47. /// Writes a group field value, including tag, to the stream.
  48. /// </summary>
  49. void WriteGroup(int fieldNumber, string fieldName, IMessageLite value);
  50. [Obsolete]
  51. void WriteUnknownGroup(int fieldNumber, string fieldName, IMessageLite value);
  52. void WriteMessage(int fieldNumber, string fieldName, IMessageLite value);
  53. void WriteBytes(int fieldNumber, string fieldName, ByteString value);
  54. [CLSCompliant(false)]
  55. void WriteUInt32(int fieldNumber, string fieldName, uint value);
  56. void WriteEnum(int fieldNumber, string fieldName, int value, string textValue);
  57. void WriteSFixed32(int fieldNumber, string fieldName, int value);
  58. void WriteSFixed64(int fieldNumber, string fieldName, long value);
  59. void WriteSInt32(int fieldNumber, string fieldName, int value);
  60. void WriteSInt64(int fieldNumber, string fieldName, long value);
  61. void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
  62. void WriteMessageArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list);
  63. void WriteGroupArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list);
  64. void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
  65. void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
  66. void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, int calculatedSize, System.Collections.IEnumerable list);
  67. void WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value);
  68. void Flush();
  69. }
  70. }