Skip to content

Commit

Permalink
merging bug23990 into default
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Alexandru Ionescu committed Mar 28, 2011
2 parents c5b617e + ada5630 commit 4920610
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Local.props.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PropTargetFramework>v3.5</PropTargetFramework>
<PropAssemblyVersion>0.0.0</PropAssemblyVersion>
<PropAssemblyVersion>0.0.0.0</PropAssemblyVersion>
<PropUsingMono>false</PropUsingMono>

<!-- Assembly strong naming - $(MSBuildProjectDirectory) is the RabbitMQ.Client project directory -->
Expand Down
2 changes: 1 addition & 1 deletion dist-msi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set -x
CYGWIN=nontsec

### Overrideable vars
test "$RABBIT_VSN" || RABBIT_VSN=0.0.0
test "$RABBIT_VSN" || RABBIT_VSN=0.0.0.0
test "$SKIP_MSIVAL2" || SKIP_MSIVAL2=

### Other, general vars
Expand Down
2 changes: 1 addition & 1 deletion dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CYGWIN=nontsec

### Overrideable vars
test "$KEYFILE" || KEYFILE=rabbit-mock.snk
test "$RABBIT_VSN" || RABBIT_VSN=0.0.0
test "$RABBIT_VSN" || RABBIT_VSN=0.0.0.0
test "$WEB_URL" || WEB_URL=http://stage.rabbitmq.com/
test "$UNOFFICIAL_RELEASE" || UNOFFICIAL_RELEASE=
test "$MONO_DIST" || MONO_DIST=
Expand Down
13 changes: 12 additions & 1 deletion projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public abstract class ModelBase : IFullModel
private CallbackExceptionEventHandler m_callbackException;
private FlowControlEventHandler m_flowControl;
private BasicRecoverOkEventHandler m_basicRecoverOk;
private IBasicConsumer m_defaultConsumer;

public ManualResetEvent m_flowControlBlock = new ManualResetEvent(true);
private readonly object m_flowSendLock = new object();
Expand Down Expand Up @@ -211,7 +212,17 @@ public event BasicRecoverOkEventHandler BasicRecoverOk
}
}

public IBasicConsumer DefaultConsumer { get; set; }
public IBasicConsumer DefaultConsumer
{
get
{
return m_defaultConsumer;
}
set
{
m_defaultConsumer = value;
}
}

public ISession m_session;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ using System.Runtime.InteropServices;

[assembly: Guid("32a32ed8-c871-45ad-86b3-f50723a7434b")]

[assembly: AssemblyVersion("${PropAssemblyVersion}.0")]
[assembly: AssemblyVersion("${PropAssemblyVersion}")]

10 changes: 8 additions & 2 deletions projects/client/Unit/src/unit/TestRecoverAfterCancel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public class TestRecoverAfterCancel
IConnection Connection;
IModel Channel;
String Queue;
int callbackCount;

public int ModelNumber(IModel model)
{
Expand Down Expand Up @@ -100,11 +101,16 @@ public void TestRecoverAfterCancel_()
[Test]
public void TestRecoverCallback()
{
int callbackCount = 0;
Channel.BasicRecoverOk += (sender, eventArgs) => callbackCount++;
callbackCount = 0;
Channel.BasicRecoverOk += IncrCallback;
Channel.BasicRecover(true);
Assert.AreEqual(1, callbackCount);
}

void IncrCallback(IModel model, EventArgs args)
{
callbackCount++;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ using System.Runtime.InteropServices;

// We don't provide an AssemblyFileVersion, which (according to MSDN)
// means that AssemblyVersion will be used for the Win32 file version.
[assembly: AssemblyVersion("${PropAssemblyVersion}.0")]
[assembly: AssemblyVersion("${PropAssemblyVersion}")]

0 comments on commit 4920610

Please sign in to comment.