Skip to content

Commit 4697f4b

Browse files
author
David R. MacIver
committed
delete ConnectionParameters and replace references to it with ConnectionFactory
1 parent 8815a59 commit 4697f4b

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

projects/wcf/RabbitMQ.ServiceModel/src/serviceModel/RabbitMQBindingConfigurationElement.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ protected override void InitializeFrom(Binding binding)
103103
this.Broker = rabbind.Broker;
104104
this.OneWayOnly = rabbind.OneWayOnly;
105105
this.TransactionFlowEnabled = rabbind.TransactionFlow;
106-
this.VirtualHost = rabbind.Transport.ConnectionParameters.VirtualHost;
107-
this.Username = rabbind.Transport.ConnectionParameters.UserName;
108-
this.Password = rabbind.Transport.ConnectionParameters.Password;
106+
this.VirtualHost = rabbind.Transport.ConnectionFactory.VirtualHost;
107+
this.Username = rabbind.Transport.ConnectionFactory.UserName;
108+
this.Password = rabbind.Transport.ConnectionFactory.Password;
109109
}
110110
}
111111

@@ -127,9 +127,9 @@ protected override void OnApplyConfiguration(Binding binding)
127127
rabbind.BrokerProtocol = this.Protocol;
128128
rabbind.OneWayOnly = this.OneWayOnly;
129129
rabbind.TransactionFlow = this.TransactionFlowEnabled;
130-
rabbind.Transport.ConnectionParameters.Password = this.Password;
131-
rabbind.Transport.ConnectionParameters.UserName = this.Username;
132-
rabbind.Transport.ConnectionParameters.VirtualHost = this.VirtualHost;
130+
rabbind.Transport.ConnectionFactory.Password = this.Password;
131+
rabbind.Transport.ConnectionFactory.UserName = this.Username;
132+
rabbind.Transport.ConnectionFactory.VirtualHost = this.VirtualHost;
133133
}
134134

135135
/// <summary>
@@ -156,7 +156,7 @@ public bool OneWayOnly
156156
/// <summary>
157157
/// Password to use when authenticating with the broker
158158
/// </summary>
159-
[ConfigurationProperty("password", DefaultValue = ConnectionParameters.DefaultPass)]
159+
[ConfigurationProperty("password", DefaultValue = ConnectionFactory.DefaultPass)]
160160
public string Password
161161
{
162162
get { return ((string)base["password"]); }
@@ -176,7 +176,7 @@ public bool TransactionFlowEnabled
176176
/// <summary>
177177
/// The username to use when authenticating with the broker
178178
/// </summary>
179-
[ConfigurationProperty("username", DefaultValue = ConnectionParameters.DefaultUser)]
179+
[ConfigurationProperty("username", DefaultValue = ConnectionFactory.DefaultUser)]
180180
public string Username
181181
{
182182
get { return ((string)base["username"]); }
@@ -220,7 +220,7 @@ public IProtocol Protocol
220220
/// <summary>
221221
/// The virtual host to access.
222222
/// </summary>
223-
[ConfigurationProperty("virtualHost", DefaultValue = ConnectionParameters.DefaultVHost)]
223+
[ConfigurationProperty("virtualHost", DefaultValue = ConnectionFactory.DefaultVHost)]
224224
public string VirtualHost
225225
{
226226
get { return ((string)base["virtualHost"]); }

projects/wcf/RabbitMQ.ServiceModel/src/serviceModel/RabbitMQTransportBindingElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public IProtocol BrokerProtocol
198198
set { m_brokerProtocol = value; }
199199
}
200200

201-
public ConnectionParameters ConnectionParameters
201+
public ConnectionFactory ConnectionFactory
202202
{
203203
get { return m_connectionFactory.Parameters; }
204204
}

projects/wcf/RabbitMQ.ServiceModel/src/serviceModel/RabbitMQTransportElement.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public override void ApplyConfiguration(BindingElement bindingElement)
8383

8484
rabbind.Broker = this.Broker;
8585
rabbind.BrokerProtocol = this.Protocol;
86-
rabbind.ConnectionParameters.Password = this.Password;
87-
rabbind.ConnectionParameters.UserName = this.Username;
88-
rabbind.ConnectionParameters.VirtualHost = this.VirtualHost;
86+
rabbind.ConnectionFactory.Password = this.Password;
87+
rabbind.ConnectionFactory.UserName = this.Username;
88+
rabbind.ConnectionFactory.VirtualHost = this.VirtualHost;
8989
}
9090

9191
public override void CopyFrom(ServiceModelExtensionElement from)
@@ -132,9 +132,9 @@ protected override void InitializeFrom(System.ServiceModel.Channels.BindingEleme
132132

133133
this.Broker = rabbind.Broker;
134134
this.ProtocolVersion = rabbind.BrokerProtocol.ApiName;
135-
this.Password = rabbind.ConnectionParameters.Password;
136-
this.Username = rabbind.ConnectionParameters.UserName;
137-
this.VirtualHost = rabbind.ConnectionParameters.VirtualHost;
135+
this.Password = rabbind.ConnectionFactory.Password;
136+
this.Username = rabbind.ConnectionFactory.UserName;
137+
this.VirtualHost = rabbind.ConnectionFactory.VirtualHost;
138138
}
139139

140140
public override System.Type BindingElementType
@@ -155,7 +155,7 @@ public Uri Broker
155155
/// <summary>
156156
/// Password to use when authenticating with the broker
157157
/// </summary>
158-
[ConfigurationProperty("password", DefaultValue = ConnectionParameters.DefaultPass)]
158+
[ConfigurationProperty("password", DefaultValue = ConnectionFactory.DefaultPass)]
159159
public string Password
160160
{
161161
get { return ((string)base["password"]); }
@@ -165,7 +165,7 @@ public string Password
165165
/// <summary>
166166
/// The username to use when authenticating with the broker
167167
/// </summary>
168-
[ConfigurationProperty("username", DefaultValue = ConnectionParameters.DefaultUser)]
168+
[ConfigurationProperty("username", DefaultValue = ConnectionFactory.DefaultUser)]
169169
public string Username
170170
{
171171
get { return ((string)base["username"]); }
@@ -208,7 +208,7 @@ private IProtocol GetProtocol()
208208
/// <summary>
209209
/// The virtual host to access.
210210
/// </summary>
211-
[ConfigurationProperty("virtualHost", DefaultValue = ConnectionParameters.DefaultVHost)]
211+
[ConfigurationProperty("virtualHost", DefaultValue = ConnectionFactory.DefaultVHost)]
212212
public string VirtualHost
213213
{
214214
get { return ((string)base["virtualHost"]); }

0 commit comments

Comments
 (0)