Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
namespace Microsoft.Azure.Management.ServiceBus.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
Expand All @@ -29,6 +31,8 @@ public CorrelationFilter()
/// <summary>
/// Initializes a new instance of the CorrelationFilter class.
/// </summary>
/// <param name="properties">dictionary object for custom
/// filters</param>
/// <param name="correlationId">Identifier of the correlation.</param>
/// <param name="messageId">Identifier of the message.</param>
/// <param name="to">Address to send to.</param>
Expand All @@ -40,8 +44,9 @@ public CorrelationFilter()
/// <param name="contentType">Content type of the message.</param>
/// <param name="requiresPreprocessing">Value that indicates whether
/// the rule action requires preprocessing.</param>
public CorrelationFilter(string correlationId = default(string), string messageId = default(string), string to = default(string), string replyTo = default(string), string label = default(string), string sessionId = default(string), string replyToSessionId = default(string), string contentType = default(string), bool? requiresPreprocessing = default(bool?))
public CorrelationFilter(IDictionary<string, string> properties = default(IDictionary<string, string>), string correlationId = default(string), string messageId = default(string), string to = default(string), string replyTo = default(string), string label = default(string), string sessionId = default(string), string replyToSessionId = default(string), string contentType = default(string), bool? requiresPreprocessing = default(bool?))
{
Properties = properties;
CorrelationId = correlationId;
MessageId = messageId;
To = to;
Expand All @@ -59,6 +64,12 @@ public CorrelationFilter()
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets dictionary object for custom filters
/// </summary>
[JsonProperty(PropertyName = "properties")]
public IDictionary<string, string> Properties { get; set; }

/// <summary>
/// Gets or sets identifier of the correlation.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
<PackageId>Microsoft.Azure.Management.ServiceBus</PackageId>
<Description>Provides developers with libraries to create and manage Namespaces and manage Authorization Rules. Note: This client library is for ServiceBus under Azure Resource Manager.</Description>
<AssemblyName>Microsoft.Azure.Management.ServiceBus</AssemblyName>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<PackageTags>Microsoft Azure ServiceBus Management;ServiceBus;ServiceBus management;</PackageTags>
<PackageReleaseNotes>
<![CDATA[
Servicebus: Properties added -
1) Queue: EnableBatchedOperations
2) Subscription: DeadLetteringOnFilterEvaluationExceptions
Servicebus: Property added -
1) Rule-Correlation Filter : 'properties' of type Dictionary<string,string>
]]>
</PackageReleaseNotes>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[assembly: AssemblyDescription("Provides Microsoft Azure ServiceBus management functions for managing the Microsoft Azure ServiceBus service.")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
Expand Down
1 change: 1 addition & 0 deletions src/SDKs/ServiceBus/Management.ServiceBus/generate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "servicebus/resource-manager" -PowershellInvoker -AutoRestVersion "latest"

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace ServiceBus.Tests.ScenarioTests
using System;
using System.Linq;
using System.Net;
using System.Collections.Generic;
using Microsoft.Azure.Management.ServiceBus;
using Microsoft.Azure.Management.ServiceBus.Models;
using Microsoft.Rest.Azure;
Expand Down Expand Up @@ -90,6 +91,15 @@ public void RulesCreateGetUpdateDelete()
Assert.NotNull(createRulesResponse);
Assert.Equal(createRulesResponse.Name, ruleName);

// Create Rule with CorrelationFilter.
var ruleName_CorrelationFilter = TestUtilities.GenerateName(ServiceBusManagementHelper.RulesPrefix);
var createRulesResponse_CorrelationFilter = ServiceBusManagementClient.Rules.CreateOrUpdate(resourceGroup, namespaceName, topicName, subscriptionName, ruleName_CorrelationFilter, new Rule() {
FilterType = FilterType.CorrelationFilter,
CorrelationFilter = new CorrelationFilter { Properties = new Dictionary<string, string> { { "topichint","topicname"} } }
});
Assert.NotNull(createRulesResponse_CorrelationFilter);
Assert.Equal(createRulesResponse_CorrelationFilter.Name, ruleName_CorrelationFilter);

// Get Created Rules
var ruleGetResponse = ServiceBusManagementClient.Rules.Get(resourceGroup, namespaceName, topicName, subscriptionName, ruleName);
Assert.NotNull(ruleGetResponse);
Expand All @@ -101,18 +111,18 @@ public void RulesCreateGetUpdateDelete()
Assert.True(getRulesListAllResponse.Count() >= 1);
Assert.True(getRulesListAllResponse.All(ns => ns.Id.Contains(resourceGroup)));

// Update Rule with Filter and Action
// Update Rule with Sql Filter and Action

var updateRulesParameter = new Rule()
{
Action = new SqlRuleAction()
{
RequiresPreprocessing = true,
SqlExpression = strSqlExp,
SqlExpression = "SET " + strSqlExp,
},
SqlFilter = new SqlFilter() { SqlExpression = strSqlExp },
FilterType = FilterType.SqlFilter,
CorrelationFilter = new CorrelationFilter()
CorrelationFilter = new CorrelationFilter()
};

var updateRulesResponse = ServiceBusManagementClient.Rules.CreateOrUpdate(resourceGroup, namespaceName, topicName, subscriptionName, ruleName, updateRulesParameter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void RulesCreateGetUpdateDelete_Length()
Action = new SqlRuleAction()
{
RequiresPreprocessing = true,
SqlExpression = strSqlExp,
SqlExpression = "SET " + strSqlExp,
},
SqlFilter = new SqlFilter() { SqlExpression = strSqlExp },
FilterType = FilterType.SqlFilter,
Expand Down
16 changes: 11 additions & 5 deletions src/SDKs/_metadata/servicebus_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
2018-03-01 19:04:56 UTC

Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/servicebus/resource-manager/readme.md --csharp --csharp-sdks-folder=D:\autorestSDK\azure-sdk-for-net\tools\..\src\SDKs\ --version=latest --reflect-api-versions
2018-03-28 17:13:31 UTC
1) azure-rest-api-specs repository information
GitHub user: Azure
GitHub fork: Azure
Branch: master
Commit: 4bdab591a66d3aad1aa876e6e48ea9f4efb84ace
Commit: 12856c1900b518e9f4fa05cde6205218cafad17d

2) AutoRest information
Requested version: latest
Bootstrapper version: C:\Users\v-ajnava\AppData\Roaming\npm `-- autorest@2.0.4245
Bootstrapper version: C:\Users\v-ajnava\AppData\Roaming\npm `-- autorest@2.0.4245


Latest installed version:
.\tools\generate.ps1 was invoked by generate.ps1