Skip to content

Commit cc26536

Browse files
author
Alexandru Scvortov
committed
improve docs
1 parent 60e7567 commit cc26536

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ensure-deliverables: rabbit-vsn
3434
file ${RELEASE_DIR}/${NAME_VSN}.msm
3535

3636
ensure-prerequisites: rabbit-vsn
37-
dpkg -L htmldoc plotutils transfig graphviz docbook-utils > /dev/null
37+
[ -f "/etc/debian_version" ] && dpkg -L htmldoc plotutils transfig graphviz docbook-utils || true > /dev/null
3838

3939
ensure-release-dir: rabbit-vsn
4040
touch ${RELEASE_DIR}/

docs/wikipages/data.ApiOverview.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ of the shell environment variable scanned.)
117117

118118
** Connecting to a broker
119119

120-
The following code connects to an AMQP broker:
120+
The following two code snippets connect to an AMQP broker:
121121

122122
@code java
123123
ConnectionFactory factory = new ConnectionFactory();
@@ -129,6 +129,11 @@ The following code connects to an AMQP broker:
129129
factory.Port = AmqpTcpEndpoint.UseDefaultPort;
130130
IConnection conn = factory.CreateConnection();
131131

132+
@code java
133+
ConnectionFactory factory = new ConnectionFactory();
134+
factory.Uri = "amqp://user:pass@hostName:port/vhost";
135+
IConnection conn = factory.CreateConnection();
136+
132137
All factory properties have default values. The default value for a property will be used if the property remains unassigned prior to creating a connection:
133138
- username: [code "guest"]
134139
- password: [code "guest"]

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,23 @@ namespace RabbitMQ.Client
7676
/// conn.Close(Constants.ReplySuccess, "Closing the connection");
7777
///</code></example>
7878
///<para>
79-
/// Please see also the API overview and tutorial in the User Guide.
79+
///The same example, written more compactly with AMQP URIs:
8080
///</para>
81+
///<example><code>
82+
/// ConnectionFactory factory = new ConnectionFactory();
83+
/// factory.Uri = "amqp://guest:guest@localhost:5672/";
84+
/// IConnection conn = factory.CreateConnection();
85+
/// ...
86+
///</code></example>
8187
///<para>
82-
/// Some of the static methods described below take, as a
83-
/// convenience, a System.Uri instance representing an AMQP server
84-
/// address. The use of Uri here is not standardised - Uri is
85-
/// simply a convenient container for internet-address-like
86-
/// components. In particular, the Uri "Scheme" property is
87-
/// ignored: only the "Host" and "Port" properties are extracted.
88+
/// Please see also the API overview and tutorial in the User Guide.
8889
///</para>
89-
///</remarks>
90+
///<para>
91+
///Note that the Uri property takes a string representation of an
92+
///AMQP URI. Omitted URI parts will take default values. The
93+
///only deviation from the spec is that URIs of the form
94+
///"amqp://foo/" (note the trailling slash) are used to represent
95+
///the default virtual host.</para></remarks>
9096
public class ConnectionFactory
9197
{
9298
/// <summary>Default user name (value: "guest")</summary>

0 commit comments

Comments
 (0)