Skip to content

Commit 72500f8

Browse files
Remove more multi-protocol support from WCF
1 parent f63606d commit 72500f8

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

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

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public override void CopyFrom(ServiceModelExtensionElement from)
8181
{
8282
this.HostName = element.HostName;
8383
this.Port = element.Port;
84-
this.ProtocolVersion = element.ProtocolVersion;
8584
this.Password = element.Password;
8685
this.Username = element.Username;
8786
this.VirtualHost = element.VirtualHost;
@@ -118,7 +117,6 @@ protected override void InitializeFrom(System.ServiceModel.Channels.BindingEleme
118117

119118
this.HostName = rabbind.HostName;
120119
this.Port = rabbind.Port;
121-
this.ProtocolVersion = rabbind.BrokerProtocol.ApiName;
122120
this.Password = rabbind.ConnectionFactory.Password;
123121
this.Username = rabbind.ConnectionFactory.UserName;
124122
this.VirtualHost = rabbind.ConnectionFactory.VirtualHost;
@@ -169,32 +167,9 @@ public string Username
169167
set { base["username"] = value; }
170168
}
171169

172-
/// <summary>
173-
/// Specifies the protocol version to use when communicating with the broker
174-
/// </summary>
175-
[ConfigurationProperty("protocolversion", DefaultValue = "DefaultProtocol")]
176-
public string ProtocolVersion
177-
{
178-
get
179-
{
180-
return ((string)base["protocolversion"]);
181-
}
182-
set
183-
{
184-
base["protocolversion"] = value;
185-
GetProtocol();
186-
}
187-
}
188-
189170
private IProtocol GetProtocol()
190171
{
191-
IProtocol result = Protocols.Lookup(this.ProtocolVersion);
192-
if (result == null)
193-
{
194-
throw new ConfigurationErrorsException(string.Format("'{0}' is not a valid AMQP protocol name",
195-
this.ProtocolVersion));
196-
}
197-
return result;
172+
return Protocols.DefaultProtocol;
198173
}
199174

200175
/// <summary>

0 commit comments

Comments
 (0)