Skip to content

Commit

Permalink
[JobRouter] Remove worker constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
williamzhao87 committed Jul 26, 2023
1 parent bcb7ee1 commit d7fd71d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ internal RouterQueueStatistics() { }
}
public partial class RouterWorker
{
public RouterWorker() { }
internal RouterWorker() { }
public System.Collections.Generic.IReadOnlyList<Azure.Communication.JobRouter.Models.RouterWorkerAssignment> AssignedJobs { get { throw null; } }
public bool? AvailableForOffers { get { throw null; } }
public System.Collections.Generic.IDictionary<string, Azure.Communication.JobRouter.ChannelConfiguration> ChannelConfigurations { get { throw null; } }
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ internal IDictionary<string, object> _labels
/// <summary> Initializes a new instance of JobQueue. </summary>
internal RouterQueue()
{
_labels = new ChangeTrackingDictionary<string, object>();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ namespace Azure.Communication.JobRouter.Models
[CodeGenModel("RouterWorker")]
public partial class RouterWorker
{
/// <summary> Initializes a new instance of RouterWorker. </summary>
internal RouterWorker()
{
_queueAssignments = new ChangeTrackingDictionary<string, object>();
_labels = new ChangeTrackingDictionary<string, object>();
_tags = new ChangeTrackingDictionary<string, object>();
_channelConfigurations = new ChangeTrackingDictionary<string, ChannelConfiguration>();
Offers = new ChangeTrackingList<RouterJobOffer>();
AssignedJobs = new ChangeTrackingList<RouterWorkerAssignment>();
}

/// <summary>
/// A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

When a new version of the swagger needs to be updated:
1. Go to sdk\communication\Azure.Communication.JobRouter\src, and run `dotnet msbuild /t:GenerateCode` to generate code.
2. Upload the Azure.Communication.JobRouter.dll to the apiview.dev tool.
If any of the new objects needs to be overwritten, add the required changes to the 'Models' folder.

3. Repeat 2 and 3 until the decided interface is reflected in the apiview.dev
2. In root folder, run `eng\scripts\Export-API.ps1 -ServiceDirectory communication/Azure.Communication.JobRouter`
3. In root folder, run `eng\scripts\Update-Snippets.ps1 -ServiceDirectory communication/Azure.Communication.JobRouter`

> see [https://aka.ms/autorest](https://aka.ms/autorest)
Expand Down

0 comments on commit d7fd71d

Please sign in to comment.