Skip to content

Commit 742feb5

Browse files
Backout a commit that does not belong to this branch
1 parent 4f7f270 commit 742feb5

File tree

26 files changed

+382
-394
lines changed

26 files changed

+382
-394
lines changed

.editorconfig

Lines changed: 0 additions & 12 deletions
This file was deleted.

projects/client/RabbitMQ.Client/src/client/api/QueueingBasicConsumer.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,24 @@ namespace RabbitMQ.Client
6868
/// The following is a simple example of the usage of this class:
6969
///</para>
7070
///<example><code>
71-
/// IModel channel = ...;
72-
/// QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel);
73-
/// channel.BasicConsume(queueName, null, consumer);
74-
///
75-
/// // At this point, messages will be being asynchronously delivered,
76-
/// // and will be queueing up in consumer.Queue.
77-
///
78-
/// while (true) {
79-
/// try {
80-
/// BasicDeliverEventArgs e = (BasicDeliverEventArgs) consumer.Queue.Dequeue();
81-
/// // ... handle the delivery ...
82-
/// channel.BasicAck(e.DeliveryTag, false);
83-
/// } catch (EndOfStreamException ex) {
84-
/// // The consumer was cancelled, the model closed, or the
85-
/// // connection went away.
86-
/// break;
87-
/// }
88-
/// }
71+
/// IModel channel = ...;
72+
/// QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel);
73+
/// channel.BasicConsume(queueName, null, consumer);
74+
///
75+
/// // At this point, messages will be being asynchronously delivered,
76+
/// // and will be queueing up in consumer.Queue.
77+
///
78+
/// while (true) {
79+
/// try {
80+
/// BasicDeliverEventArgs e = (BasicDeliverEventArgs) consumer.Queue.Dequeue();
81+
/// // ... handle the delivery ...
82+
/// channel.BasicAck(e.DeliveryTag, false);
83+
/// } catch (EndOfStreamException ex) {
84+
/// // The consumer was cancelled, the model closed, or the
85+
/// // connection went away.
86+
/// break;
87+
/// }
88+
/// }
8989
///</code></example>
9090
///</remarks>
9191
public class QueueingBasicConsumer : DefaultBasicConsumer

projects/client/RabbitMQ.Client/src/client/content/BasicMessageBuilder.cs

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,27 @@ public BasicMessageBuilder(IModel model, int initialAccumulatorSize) {
9494

9595
///<summary>Retrieve the IBasicProperties associated with this instance.</summary>
9696
public IBasicProperties Properties {
97-
get {
98-
return m_properties;
99-
}
100-
}
97+
get {
98+
return m_properties;
99+
}
100+
}
101101

102102
///<summary>Implement IMessageBuilder.Headers</summary>
103-
public IDictionary<string, object> Headers {
104-
get {
105-
if (Properties.Headers == null) {
106-
Properties.Headers = new Dictionary<string, object>();
107-
}
108-
return Properties.Headers;
109-
}
110-
}
103+
public IDictionary<string, object> Headers {
104+
get {
105+
if (Properties.Headers == null) {
106+
Properties.Headers = new Dictionary<string, object>();
107+
}
108+
return Properties.Headers;
109+
}
110+
}
111111

112112
///<summary>Implement IMessageBuilder.BodyStream</summary>
113113
public Stream BodyStream {
114-
get {
115-
return m_accumulator;
116-
}
117-
}
114+
get {
115+
return m_accumulator;
116+
}
117+
}
118118

119119
///<summary>Implement
120120
///IMessageBuilder.GetDefaultContentType(). Returns null;
@@ -123,31 +123,31 @@ public virtual string GetDefaultContentType() {
123123
return null;
124124
}
125125

126-
///<summary>Implement IMessageBuilder.RawWrite</summary>
127-
public IMessageBuilder RawWrite(byte b) {
128-
BodyStream.WriteByte(b);
129-
return this;
130-
}
131-
132-
///<summary>Implement IMessageBuilder.RawWrite</summary>
133-
public IMessageBuilder RawWrite(byte[] bytes) {
134-
return RawWrite(bytes, 0, bytes.Length);
135-
}
136-
137-
///<summary>Implement IMessageBuilder.RawWrite</summary>
138-
public IMessageBuilder RawWrite(byte[] bytes, int offset, int length) {
139-
BodyStream.Write(bytes, offset, length);
140-
return this;
141-
}
142-
143-
///<summary>Implement IMessageBuilder.GetContentHeader</summary>
144-
public virtual IContentHeader GetContentHeader() {
145-
return m_properties;
146-
}
147-
148-
///<summary>Implement IMessageBuilder.GetContentBody</summary>
149-
public virtual byte[] GetContentBody() {
150-
return m_accumulator.ToArray();
151-
}
126+
///<summary>Implement IMessageBuilder.RawWrite</summary>
127+
public IMessageBuilder RawWrite(byte b) {
128+
BodyStream.WriteByte(b);
129+
return this;
130+
}
131+
132+
///<summary>Implement IMessageBuilder.RawWrite</summary>
133+
public IMessageBuilder RawWrite(byte[] bytes) {
134+
return RawWrite(bytes, 0, bytes.Length);
135+
}
136+
137+
///<summary>Implement IMessageBuilder.RawWrite</summary>
138+
public IMessageBuilder RawWrite(byte[] bytes, int offset, int length) {
139+
BodyStream.Write(bytes, offset, length);
140+
return this;
141+
}
142+
143+
///<summary>Implement IMessageBuilder.GetContentHeader</summary>
144+
public virtual IContentHeader GetContentHeader() {
145+
return m_properties;
146+
}
147+
148+
///<summary>Implement IMessageBuilder.GetContentBody</summary>
149+
public virtual byte[] GetContentBody() {
150+
return m_accumulator.ToArray();
151+
}
152152
}
153153
}

projects/client/RabbitMQ.Client/src/client/content/BytesMessageBuilder.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,63 +69,63 @@ public override string GetDefaultContentType() {
6969
///<summary>Writes an int value into the message body being assembled.</summary>
7070
public IBytesMessageBuilder WriteInt32(int value) {
7171
BytesWireFormatting.WriteInt32(Writer, value);
72-
return this;
72+
return this;
7373
}
7474

7575
///<summary>Writes a short value into the message body being assembled.</summary>
7676
public IBytesMessageBuilder WriteInt16(short value) {
7777
BytesWireFormatting.WriteInt16(Writer, value);
78-
return this;
78+
return this;
7979
}
8080

8181
///<summary>Writes a byte value into the message body being assembled.</summary>
8282
public IBytesMessageBuilder WriteByte(byte value) {
8383
BytesWireFormatting.WriteByte(Writer, value);
84-
return this;
84+
return this;
8585
}
8686

8787
///<summary>Writes a char value into the message body being assembled.</summary>
8888
public IBytesMessageBuilder WriteChar(char value) {
8989
BytesWireFormatting.WriteChar(Writer, value);
90-
return this;
90+
return this;
9191
}
9292

9393
///<summary>Writes a long value into the message body being assembled.</summary>
9494
public IBytesMessageBuilder WriteInt64(long value) {
9595
BytesWireFormatting.WriteInt64(Writer, value);
96-
return this;
96+
return this;
9797
}
9898

9999
///<summary>Writes a float value into the message body being assembled.</summary>
100100
public IBytesMessageBuilder WriteSingle(float value) {
101101
BytesWireFormatting.WriteSingle(Writer, value);
102-
return this;
102+
return this;
103103
}
104104

105105
///<summary>Writes a double value into the message body being assembled.</summary>
106106
public IBytesMessageBuilder WriteDouble(double value) {
107107
BytesWireFormatting.WriteDouble(Writer, value);
108-
return this;
108+
return this;
109109
}
110110

111111
///<summary>Write a section of a byte array into the message
112112
///body being assembled.</summary>
113113
public IBytesMessageBuilder Write(byte[] source, int offset, int count) {
114114
BytesWireFormatting.Write(Writer, source, offset, count);
115-
return this;
115+
return this;
116116
}
117117

118118
///<summary>Write a byte array into the message body being
119119
///assembled.</summary>
120120
public IBytesMessageBuilder WriteBytes(byte[] source) {
121121
BytesWireFormatting.WriteBytes(Writer, source);
122-
return this;
122+
return this;
123123
}
124124

125125
///<summary>Writes a string value into the message body being assembled.</summary>
126126
public IBytesMessageBuilder WriteString(string value) {
127127
BytesWireFormatting.WriteString(Writer, value);
128-
return this;
128+
return this;
129129
}
130130
}
131131
}

projects/client/RabbitMQ.Client/src/client/content/BytesMessageReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace RabbitMQ.Client.Content {
5050
public class BytesMessageReader: BasicMessageReader, IBytesMessageReader {
5151
///<summary>MIME type associated with QPid BytesMessages.</summary>
5252
public readonly static string MimeType = BytesMessageBuilder.MimeType;
53-
// ^ repeated here for convenience
53+
// ^ repeated here for convenience
5454

5555
///<summary>Construct an instance for reading. See superclass.</summary>
5656
public BytesMessageReader(IBasicProperties properties, byte[] payload)

projects/client/RabbitMQ.Client/src/client/content/IMapMessageBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ namespace RabbitMQ.Client.Content {
4545
///<summary>Interface for constructing messages binary-compatible
4646
///with QPid's "MapMessage" wire encoding.</summary>
4747
public interface IMapMessageBuilder: IMessageBuilder {
48-
///<summary>Retrieves the dictionary that will be written into
49-
///the body of the message.</summary>
50-
IDictionary<string, object> Body { get; }
48+
///<summary>Retrieves the dictionary that will be written into
49+
///the body of the message.</summary>
50+
IDictionary<string, object> Body { get; }
5151
}
5252
}

projects/client/RabbitMQ.Client/src/client/content/IMessageBuilder.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,31 @@ public interface IMessageBuilder {
5555
///<summary>Returns the default MIME content type for messages
5656
///this instance constructs, or null if none is available or
5757
///relevant.</summary>
58-
string GetDefaultContentType();
58+
string GetDefaultContentType();
5959

6060
///<summary>Retrieves the dictionary that will be used to
6161
///construct the message header table. It is of type <see cref="T:System.Collections.Generic.IDictionary{String,Object}" /></summary>
6262
IDictionary<string, object> Headers { get; }
6363

64-
///<summary>Retrieve the Stream being used to construct the message body.</summary>
65-
Stream BodyStream { get; }
64+
///<summary>Retrieve the Stream being used to construct the message body.</summary>
65+
Stream BodyStream { get; }
6666

67-
///<summary>Write a single byte into the message body, without
68-
///encoding or interpretation.</summary>
69-
IMessageBuilder RawWrite(byte b);
67+
///<summary>Write a single byte into the message body, without
68+
///encoding or interpretation.</summary>
69+
IMessageBuilder RawWrite(byte b);
7070

71-
///<summary>Write a byte array into the message body, without
72-
///encoding or interpretation.</summary>
73-
IMessageBuilder RawWrite(byte[] bytes);
71+
///<summary>Write a byte array into the message body, without
72+
///encoding or interpretation.</summary>
73+
IMessageBuilder RawWrite(byte[] bytes);
7474

75-
///<summary>Write a section of a byte array into the message
76-
///body, without encoding or interpretation.</summary>
77-
IMessageBuilder RawWrite(byte[] bytes, int offset, int length);
75+
///<summary>Write a section of a byte array into the message
76+
///body, without encoding or interpretation.</summary>
77+
IMessageBuilder RawWrite(byte[] bytes, int offset, int length);
7878

79-
///<summary>Finish and retrieve the content header for transmission.</summary>
80-
IContentHeader GetContentHeader();
79+
///<summary>Finish and retrieve the content header for transmission.</summary>
80+
IContentHeader GetContentHeader();
8181

82-
///<summary>Finish and retrieve the content body for transmission.</summary>
83-
byte[] GetContentBody();
82+
///<summary>Finish and retrieve the content body for transmission.</summary>
83+
byte[] GetContentBody();
8484
}
8585
}

projects/client/RabbitMQ.Client/src/client/content/IMessageReader.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,26 @@ namespace RabbitMQ.Client.Content {
5050
/// bytes, with no special encodings for higher-level objects.
5151
///</remarks>
5252
public interface IMessageReader {
53-
///<summary>Retrieves the content header properties of the
54-
///message being read. Is of type <see cref="T:System.Collections.Generic.IDictionary{String, Object}" /></summary>
55-
IDictionary<string, object> Headers { get; }
53+
///<summary>Retrieves the content header properties of the
54+
///message being read. Is of type <seealso cref="IDictionary{string, object}"/></summary>
55+
IDictionary<string, object> Headers { get; }
5656

57-
///<summary>Retrieve the message body, as a byte array.</summary>
58-
byte[] BodyBytes { get; }
57+
///<summary>Retrieve the message body, as a byte array.</summary>
58+
byte[] BodyBytes { get; }
5959

60-
///<summary>Retrieve the Stream being used to read from the message body.</summary>
61-
Stream BodyStream { get; }
60+
///<summary>Retrieve the Stream being used to read from the message body.</summary>
61+
Stream BodyStream { get; }
6262

63-
///<summary>Read a single byte from the body stream, without
64-
///encoding or interpretation. Returns -1 for end-of-stream.</summary>
65-
int RawRead();
63+
///<summary>Read a single byte from the body stream, without
64+
///encoding or interpretation. Returns -1 for end-of-stream.</summary>
65+
int RawRead();
6666

67-
///<summary>Read bytes from the body stream into a section of
68-
///an existing byte array, without encoding or
69-
///interpretation. Returns the number of bytes read from the
70-
///body and written into the target array, which may be less
71-
///than the number requested if the end-of-stream is
72-
///reached.</summary>
73-
int RawRead(byte[] target, int offset, int length);
67+
///<summary>Read bytes from the body stream into a section of
68+
///an existing byte array, without encoding or
69+
///interpretation. Returns the number of bytes read from the
70+
///body and written into the target array, which may be less
71+
///than the number requested if the end-of-stream is
72+
///reached.</summary>
73+
int RawRead(byte[] target, int offset, int length);
7474
}
7575
}

projects/client/RabbitMQ.Client/src/client/content/MapMessageBuilder.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ public class MapMessageBuilder: BasicMessageBuilder, IMapMessageBuilder {
5151
///<summary>MIME type associated with QPid MapMessages.</summary>
5252
public readonly static string MimeType = "jms/map-message";
5353

54-
protected IDictionary<string, object> m_table = new Dictionary<string, object>();
54+
protected IDictionary<string, object> m_table = new Dictionary<string, object>();
5555

56-
///<summary>Implement IMapMessageBuilder.Body</summary>
57-
public IDictionary<string, object> Body {
58-
get {
59-
return m_table;
60-
}
61-
}
56+
///<summary>Implement IMapMessageBuilder.Body</summary>
57+
public IDictionary<string, object> Body {
58+
get {
59+
return m_table;
60+
}
61+
}
6262

6363
///<summary>Construct an instance for writing. See superclass.</summary>
6464
public MapMessageBuilder(IModel model)
@@ -75,17 +75,17 @@ public override string GetDefaultContentType() {
7575
return MimeType;
7676
}
7777

78-
///<summary>Override superclass method to write Body out into
79-
///the message BodyStream before retrieving the final byte
80-
///array.</summary>
81-
///<remarks>
82-
/// Calling this message clears Body to null. Subsequent calls
83-
/// will fault.
84-
///</remarks>
85-
public override byte[] GetContentBody() {
78+
///<summary>Override superclass method to write Body out into
79+
///the message BodyStream before retrieving the final byte
80+
///array.</summary>
81+
///<remarks>
82+
/// Calling this message clears Body to null. Subsequent calls
83+
/// will fault.
84+
///</remarks>
85+
public override byte[] GetContentBody() {
8686
MapWireFormatting.WriteMap(Writer, m_table);
87-
m_table = null;
88-
return base.GetContentBody();
89-
}
87+
m_table = null;
88+
return base.GetContentBody();
89+
}
9090
}
9191
}

0 commit comments

Comments
 (0)