File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
projects/client/RabbitMQ.Client/src/client/api Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,18 @@ namespace RabbitMQ.Client
72
72
/// A simple example of connecting to a broker:
73
73
///</para>
74
74
///<example><code>
75
- /// ConnectionFactory factory = new ConnectionFactory();
76
75
/// //
77
- /// // The next three lines are optional:
78
- /// factory.Parameters.UserName = AMQPParameters.DefaultUser;
79
- /// factory.Parameters.Password = AMQPParameters.DefaultPass;
80
- /// factory.Parameters.VirtualHost = AMQPParameters.DefaultVHost;
81
76
/// //
82
77
/// IProtocol protocol = Protocols.DefaultProtocol;
83
- /// IConnection conn = factory.CreateConnection(protocol, hostName, portNumber);
78
+ /// ConnectionFactory factory = new ConnectionFactory();
79
+ /// // The next five lines are optional:
80
+ /// AMQPParameters params = new AMQPParameters();
81
+ /// params.UserName = AMQPParameters.DefaultUser;
82
+ /// params.Password = AMQPParameters.DefaultPass;
83
+ /// params.VirtualHost = AMQPParameters.DefaultVHost;
84
+ /// factory.Parameters = new ConnectionParameters[]{ new ConnectionParameters(params) };
85
+ /// //
86
+ /// IConnection conn = factory.CreateConnection();
84
87
/// //
85
88
/// IModel ch = conn.CreateModel();
86
89
/// //
You can’t perform that action at this time.
0 commit comments