Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
paolos authored and paolos committed Apr 12, 2017
2 parents 219c44a + ba98e99 commit c475c61
Show file tree
Hide file tree
Showing 10 changed files with 559 additions and 390 deletions.
2 changes: 1 addition & 1 deletion App.config
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
792 changes: 474 additions & 318 deletions Controls/HandleQueueControl.Designer.cs

Large diffs are not rendered by default.

114 changes: 52 additions & 62 deletions Controls/HandleQueueControl.cs

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions Controls/HandleSubscriptionControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,16 @@ public void GetMessageSessions()

public async Task<long> PurgeMessagesAsync()
{
var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath, subscriptionWrapper.SubscriptionDescription.Name);
var result = MessageBox.Show(this, $"Would you like to purge {entityPath}?", "Purge messages", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
if (result != DialogResult.Yes)
{
return 0;
}

var stopwatch = new Stopwatch();
stopwatch.Start();
var entityPath = SubscriptionClient.FormatSubscriptionPath(subscriptionWrapper.SubscriptionDescription.TopicPath,
subscriptionWrapper.SubscriptionDescription.Name);

var messagingFactory = MessagingFactory.CreateFromConnectionString(serviceBusHelper.ConnectionString);
var receiver = await messagingFactory.CreateMessageReceiverAsync(entityPath, ReceiveMode.ReceiveAndDelete);
var count = 0;
Expand Down Expand Up @@ -427,10 +433,15 @@ public async Task<long> PurgeMessagesAsync()

public async Task<long> PurgeDeadletterQueueMessagesAsync()
{
var entityPath = SubscriptionClient.FormatDeadLetterPath(subscriptionWrapper.SubscriptionDescription.TopicPath, subscriptionWrapper.SubscriptionDescription.Name);
var result = MessageBox.Show(this, $"Would you like to purge {entityPath}?", "Purge messages", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
if (result != DialogResult.Yes)
{
return 0;
}

var stopwatch = new Stopwatch();
stopwatch.Start();
var entityPath = SubscriptionClient.FormatDeadLetterPath(subscriptionWrapper.SubscriptionDescription.TopicPath,
subscriptionWrapper.SubscriptionDescription.Name);
var messagingFactory = MessagingFactory.CreateFromConnectionString(serviceBusHelper.ConnectionString);
var receiver = await messagingFactory.CreateMessageReceiverAsync(entityPath, ReceiveMode.ReceiveAndDelete);
var count = 0;
Expand Down
2 changes: 1 addition & 1 deletion Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6227,7 +6227,7 @@ private void receiveMessages_Click(object sender, EventArgs e)
{
if (deadletter)
{
control.GetDeadletterMessages();
control.GetDeadletterMessages(false);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Helpers/VersionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static string GetVersion()
{
var asm = Assembly.GetExecutingAssembly();
var versionInfo = FileVersionInfo.GetVersionInfo(asm.Location);
return $"{versionInfo.ProductMajorPart}.{versionInfo.ProductMinorPart}.{versionInfo.ProductBuildPart}";
return $"{versionInfo.FileMajorPart}.{versionInfo.FileMinorPart}.{versionInfo.FileBuildPart}";
}
}
}
6 changes: 4 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// Notice: ServiceBusExplorer uses GitVersionTask for assembly numbering.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("1.0.0.0")]
// [assembly: AssemblyFileVersion("1.0.0.0")]



2 changes: 1 addition & 1 deletion ServiceBusExplorer.Tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
9 changes: 9 additions & 0 deletions ServiceBusExplorer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -750,6 +752,13 @@
<None Include="Images\MicrosoftAzureWhiteLogo.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets" Condition="Exists('packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
1 change: 1 addition & 0 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GitVersionTask" version="3.6.5" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.Azure.NotificationHubs" version="2.16.0.234" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.3" targetFramework="net461" />
<package id="Newtonsoft.Json" version="10.0.1" targetFramework="net461" />
Expand Down

0 comments on commit c475c61

Please sign in to comment.