Skip to content

Commit 2291e4e

Browse files
author
Emile Joubert
committed
Merged bug22772 into bug22942
2 parents fbd526e + fe05d16 commit 2291e4e

File tree

18 files changed

+177
-203
lines changed

18 files changed

+177
-203
lines changed

docs/wikipages/data.UserGuide.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ NDocProc-generated javadoc-like HTML documentation.
1313
** AMQP dialects implemented
1414

1515
The client library implements AMQP specifications version 0-8, 0-8bis
16-
(0-8 as modified by QPid for their M2 release) and 0-9 (omitting
16+
(0-8 as modified by QPid for their M2 release), 0-9 (omitting
1717
sections of the specification marked "work in progress", i.e. the
18-
[code Message] content-class). The ApiGen tool processes the
18+
[code Message] content-class) and 0-9-1. The ApiGen tool processes the
1919
specification XML files in conjunction with certain C# interfaces,
2020
generating C# code directly, which is compiled into the final
2121
assembly.

projects/client/Apigen/src/apigen/Apigen.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public void ParseSpec() {
312312
}
313313
foreach (XmlNode n in m_spec.SelectNodes("/amqp/domain")) {
314314
m_domains[GetString(n, "@name")] = GetString(n, "@type");
315-
}
315+
}
316316
}
317317

318318
public void ReflectModel() {
@@ -859,10 +859,10 @@ public void EmitContentHeaderFactory(MethodInfo method) {
859859
{
860860
EmitLine(String.Format(" return default({0});", method.ReturnType));
861861
}
862-
else
862+
else
863863
{
864864
EmitLine(" return new " + MangleClass(contentClass) + "Properties();");
865-
}
865+
}
866866
EmitLine(" }");
867867
}
868868

@@ -1158,7 +1158,7 @@ public void EmitAsynchronousHandlers(ArrayList asynchronousHandlers) {
11581158
Emit(" __impl.m_" + (fieldMapping == null
11591159
? pi.Name
11601160
: fieldMapping.m_fieldName));
1161-
}
1161+
}
11621162
if (remaining > 0)
11631163
{
11641164
EmitLine(",");

projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj

Lines changed: 32 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<!-- Warning! This file contains important customizations. Using Visual Studio to edit project's properties might break things. -->
4+
45
<!-- Props file -->
56
<PropertyGroup>
67
<LocalPropsFile>$(MSBuildProjectDirectory)\..\..\..\Local.props</LocalPropsFile>
@@ -11,13 +12,15 @@
1112
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\..\..\..\lib\MSBuild.Community.Tasks\</MSBuildCommunityTasksPath>
1213
</PropertyGroup>
1314
<Import Project="$(MSBuildCommunityTasksPath)MSBuild.Community.Tasks.Targets" />
15+
1416
<!-- Gensrc dir -->
1517
<PropertyGroup>
1618
<GensrcDir>..\..\..\gensrc\$(MSBuildProjectName)\</GensrcDir>
1719
</PropertyGroup>
1820
<Target Name="CreateGensrcDir">
1921
<MakeDir Directories="$(GensrcDir)" />
2022
</Target>
23+
2124
<!-- API autogeneration -->
2225
<PropertyGroup>
2326
<SpecsDir>..\..\..\docs\specs\</SpecsDir>
@@ -40,52 +43,29 @@
4043
<ApiGenExe>..\Apigen\build\bin\rabbitmq-dotnet-apigen.exe</ApiGenExe>
4144
</PropertyGroup>
4245
<ItemGroup>
43-
<AmqpSpecs Include="$(AmqpSpec0_9_1)">
44-
<Link>specs\$(AmqpSpec0_9_1BaseName)</Link>
45-
</AmqpSpecs>
46-
<AmqpSpecs Include="$(AmqpSpec0_9)">
47-
<Link>specs\$(AmqpSpec0_9BaseName)</Link>
48-
</AmqpSpecs>
49-
<AmqpSpecs Include="$(AmqpSpec0_8qpid)">
50-
<Link>specs\$(AmqpSpec0_8qpidBaseName)</Link>
51-
</AmqpSpecs>
52-
<AmqpSpecs Include="$(AmqpSpec0_8)">
53-
<Link>specs\$(AmqpSpec0_8BaseName)</Link>
54-
</AmqpSpecs>
55-
<AutogeneratedApi Include="$(AutogeneratedApi0_9_1)">
56-
<Link>src\gensrc\$(AutogeneratedApi0_9_1BaseName)</Link>
57-
</AutogeneratedApi>
58-
<AutogeneratedApi Include="$(AutogeneratedApi0_9)">
59-
<Link>src\gensrc\$(AutogeneratedApi0_9BaseName)</Link>
60-
</AutogeneratedApi>
61-
<AutogeneratedApi Include="$(AutogeneratedApi0_8qpid)">
62-
<Link>src\gensrc\$(AutogeneratedApi0_8qpidBaseName)</Link>
63-
</AutogeneratedApi>
64-
<AutogeneratedApi Include="$(AutogeneratedApi0_8)">
65-
<Link>src\gensrc\$(AutogeneratedApi0_8BaseName)</Link>
66-
</AutogeneratedApi>
67-
<Compile Include="$(AutogeneratedApi0_9_1)">
68-
<Visible>false</Visible>
69-
</Compile>
70-
<Compile Include="$(AutogeneratedApi0_9)">
71-
<Visible>false</Visible>
72-
</Compile>
73-
<Compile Include="$(AutogeneratedApi0_8qpid)">
74-
<Visible>false</Visible>
75-
</Compile>
76-
<Compile Include="$(AutogeneratedApi0_8)">
77-
<Visible>false</Visible>
78-
</Compile>
46+
<AmqpSpecs Include="$(AmqpSpec0_9_1)"><Link>specs\$(AmqpSpec0_9_1BaseName)</Link></AmqpSpecs>
47+
<AmqpSpecs Include="$(AmqpSpec0_9)"><Link>specs\$(AmqpSpec0_9BaseName)</Link></AmqpSpecs>
48+
<AmqpSpecs Include="$(AmqpSpec0_8qpid)"><Link>specs\$(AmqpSpec0_8qpidBaseName)</Link></AmqpSpecs>
49+
<AmqpSpecs Include="$(AmqpSpec0_8)"><Link>specs\$(AmqpSpec0_8BaseName)</Link></AmqpSpecs>
50+
<AutogeneratedApi Include="$(AutogeneratedApi0_9_1)"><Link>src\gensrc\$(AutogeneratedApi0_9_1BaseName)</Link></AutogeneratedApi>
51+
<AutogeneratedApi Include="$(AutogeneratedApi0_9)"><Link>src\gensrc\$(AutogeneratedApi0_9BaseName)</Link></AutogeneratedApi>
52+
<AutogeneratedApi Include="$(AutogeneratedApi0_8qpid)"><Link>src\gensrc\$(AutogeneratedApi0_8qpidBaseName)</Link></AutogeneratedApi>
53+
<AutogeneratedApi Include="$(AutogeneratedApi0_8)"><Link>src\gensrc\$(AutogeneratedApi0_8BaseName)</Link></AutogeneratedApi>
54+
<Compile Include="$(AutogeneratedApi0_9_1)"><Visible>false</Visible></Compile>
55+
<Compile Include="$(AutogeneratedApi0_9)"><Visible>false</Visible></Compile>
56+
<Compile Include="$(AutogeneratedApi0_8qpid)"><Visible>false</Visible></Compile>
57+
<Compile Include="$(AutogeneratedApi0_8)"><Visible>false</Visible></Compile>
7958
</ItemGroup>
8059
<Target Name="GenerateApi" DependsOnTargets="CreateGensrcDir" Inputs="@(AmqpSpecs);$(ApiGenExe)" Outputs="@(AutogeneratedApi)">
81-
<Exec Command="$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_9_1 /n:v0_9_1 $(AmqpSpec0_9_1) $(AutogeneratedApi0_9_1)" WorkingDirectory="$(ProjectDir)" />
82-
<Exec Command="$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_9 /n:v0_9 $(AmqpSpec0_9) $(AutogeneratedApi0_9)" WorkingDirectory="$(ProjectDir)" />
83-
<Exec Command="$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_8_QPID /n:v0_8qpid $(AmqpSpec0_8qpid) $(AutogeneratedApi0_8qpid)" WorkingDirectory="$(ProjectDir)" />
84-
<Exec Command="$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_8 /n:v0_8 $(AmqpSpec0_8) $(AutogeneratedApi0_8)" WorkingDirectory="$(ProjectDir)" />
60+
<Exec Command='$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_9_1 /n:v0_9_1 $(AmqpSpec0_9_1) $(AutogeneratedApi0_9_1)' WorkingDirectory="$(ProjectDir)" />
61+
<Exec Command='$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_9 /n:v0_9 $(AmqpSpec0_9) $(AutogeneratedApi0_9)' WorkingDirectory="$(ProjectDir)" />
62+
<Exec Command='$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_8_QPID /n:v0_8qpid $(AmqpSpec0_8qpid) $(AutogeneratedApi0_8qpid)' WorkingDirectory="$(ProjectDir)" />
63+
<Exec Command='$(PropLaunchExe)$(ApiGenExe) /apiName:AMQP_0_8 /n:v0_8 $(AmqpSpec0_8) $(AutogeneratedApi0_8)' WorkingDirectory="$(ProjectDir)" />
8564
</Target>
8665
<Target Name="CleanGenerateApi">
8766
<Delete Files="@(AutogeneratedApi)" />
8867
</Target>
68+
8969
<!-- Detokenize -->
9070
<PropertyGroup>
9171
<AssemblyInfoBaseName>AssemblyInfo.cs</AssemblyInfoBaseName>
@@ -94,16 +74,9 @@
9474
</PropertyGroup>
9575
<ItemGroup>
9676
<Tokenized Include="$(AssemblyInfoTok)" />
97-
<Detokenized Include="$(AssemblyInfoDetok)">
98-
<Link>properties\$(AssemblyInfoBaseName)</Link>
99-
</Detokenized>
100-
<Compile Include="$(AssemblyInfoDetok)">
101-
<Visible>false</Visible>
102-
</Compile>
103-
<Tokens Include="PropAssemblyVersion">
104-
<ReplacementValue>$(PropAssemblyVersion)</ReplacementValue>
105-
<Visible>false</Visible>
106-
</Tokens>
77+
<Detokenized Include="$(AssemblyInfoDetok)"><Link>properties\$(AssemblyInfoBaseName)</Link></Detokenized>
78+
<Compile Include="$(AssemblyInfoDetok)"><Visible>false</Visible></Compile>
79+
<Tokens Include="PropAssemblyVersion"><ReplacementValue>$(PropAssemblyVersion)</ReplacementValue><Visible>false</Visible></Tokens>
10780
</ItemGroup>
10881
<Target Name="Detokenize" DependsOnTargets="CreateGensrcDir" Inputs="@(Tokenized); $(LocalPropsFile)" Outputs="@(Detokenized)">
10982
<Delete Files="@(Detokenized)" />
@@ -113,6 +86,7 @@
11386
<Target Name="CleanDetokenize">
11487
<Delete Files="@(Detokenized)" />
11588
</Target>
89+
11690
<!-- Visual Studio generated -->
11791
<PropertyGroup>
11892
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -156,22 +130,25 @@
156130
<AssemblyOriginatorKeyFile>$(PropKeyfile)</AssemblyOriginatorKeyFile>
157131
</PropertyGroup>
158132
<ItemGroup>
159-
<Compile Include="src\client\**\*.cs" />
160-
<Compile Include="src\util\**\*.cs" />
161-
</ItemGroup>
133+
<Compile Include="src\client\**\*.cs" />
134+
<Compile Include="src\util\**\*.cs" /> </ItemGroup>
162135
<ItemGroup>
163136
<Reference Include="System" />
164137
<Reference Include="System.Data" />
165138
<Reference Include="System.Xml" />
166139
</ItemGroup>
140+
167141
<!-- Mono compatibility workarounds -->
168142
<PropertyGroup Condition=" '$(PropUsingMono)' == 'true'">
169143
<_DisabledWarnings>$(NoWarn)</_DisabledWarnings>
170144
</PropertyGroup>
145+
171146
<!-- Microsoft CSharp targets -->
172-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
147+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
148+
173149
<!-- Custom BeforeBuild-->
174150
<Target Name="BeforeBuild" DependsOnTargets="GenerateApi; Detokenize" />
151+
175152
<!-- Custom BeforeClean -->
176153
<Target Name="BeforeClean" DependsOnTargets="CleanGenerateApi; CleanDetokenize" />
177154
</Project>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,10 @@ public virtual IConnection CreateConnection()
326326
{
327327
if (Protocol.SupportsRedirect)
328328
{
329-
return CreateConnection(0);
329+
return CreateConnection(0);
330330
}
331331
else
332-
{
332+
{
333333
return Protocol.CreateConnection(this, false, Protocol.CreateFrameHandler(Endpoint));
334334
}
335335
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ void ConnectionTuneOk(ushort channelMax,
713713
[AmqpMethodMapping(null, "connection", "open")]
714714
void _Private_ConnectionOpen(string virtualHost,
715715
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_9_1", "reserved1")]
716-
string capabilities,
716+
string capabilities,
717717
[AmqpFieldMapping("RabbitMQ.Client.Framing.v0_9_1", "reserved2")]
718718
bool insist);
719719

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static IProtocol AMQP_0_9_1
115115
///(currently AMQP_0_8)</summary>
116116
public static IProtocol DefaultProtocol
117117
{
118-
get { return AMQP_0_8; }
118+
get { return AMQP_0_9_1; }
119119
}
120120

121121
///<summary>Low-level method for retrieving a protocol version

projects/client/RabbitMQ.Client/src/client/impl/AbstractProtocolBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ public abstract class AbstractProtocolBase: IProtocol {
6565
public abstract int Revision { get; }
6666
public abstract string ApiName { get; }
6767
public abstract int DefaultPort { get; }
68-
public virtual bool SupportsRedirect
69-
{
70-
get { return true; }
68+
public virtual bool SupportsRedirect
69+
{
70+
get { return true; }
7171
}
7272

7373
public abstract IFrameHandler CreateFrameHandler(AmqpTcpEndpoint endpoint);

projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ protected void OpenCommon()
982982
m_frameHandler.SendHeader();
983983

984984
ConnectionStartDetails connectionStart = (ConnectionStartDetails)
985-
connectionStartCell.Value;
985+
connectionStartCell.Value;
986986

987987
ServerProperties = connectionStart.m_serverProperties;
988988

@@ -1005,13 +1005,13 @@ protected void OpenCommon()
10051005
ConnectionTuneDetails connectionTune = default(ConnectionTuneDetails);
10061006
try
10071007
{
1008-
connectionTune =
1009-
m_model0.ConnectionStartOk(m_clientProperties,
1010-
"PLAIN",
1011-
Encoding.UTF8.GetBytes(
1012-
"\0" + m_factory.UserName +
1013-
"\0" + m_factory.Password),
1014-
"en_US");
1008+
connectionTune =
1009+
m_model0.ConnectionStartOk(m_clientProperties,
1010+
"PLAIN",
1011+
Encoding.UTF8.GetBytes(
1012+
"\0" + m_factory.UserName +
1013+
"\0" + m_factory.Password),
1014+
"en_US");
10151015
}
10161016
catch (OperationInterruptedException e)
10171017
{

projects/client/RabbitMQ.Client/src/client/impl/v0_9_1/ProtocolBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public override void CreateChannelClose(ushort reasonCode,
104104
reasonText,
105105
0, 0));
106106
replyClassId = RabbitMQ.Client.Framing.Impl.v0_9_1.ChannelCloseOk.ClassId;
107-
replyMethodId = RabbitMQ.Client.Framing.Impl.v0_9_1.ChannelCloseOk.MethodId;
107+
replyMethodId = RabbitMQ.Client.Framing.Impl.v0_9_1.ChannelCloseOk.MethodId;
108108
}
109-
109+
110110
public override bool CanSendWhileClosed(Command cmd)
111111
{
112112
return cmd.m_method is RabbitMQ.Client.Framing.Impl.v0_9_1.ChannelCloseOk;

0 commit comments

Comments
 (0)