-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refac: Improve model for Process Manager (Http) (#1391)
* Use FromBodyAttribute from Microsoft.Azure.Functions.Worker.Http namespace * Use ComplexProperty where possible * Implement OrchestrationDescriptionUniqueName and refactor accordingly * OrchestrationDescriptionUniqueNameDto * Delete dto
- Loading branch information
1 parent
8587c3a
commit 20c5bd8
Showing
19 changed files
with
183 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...ProcessManager.Core/Domain/OrchestrationDescription/OrchestrationDescriptionUniqueName.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2020 Energinet DataHub A/S | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License2"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace Energinet.DataHub.ProcessManagement.Core.Domain.OrchestrationDescription; | ||
|
||
/// <summary> | ||
/// Uniquely identifies a specific implementation of the orchestration. | ||
/// </summary> | ||
public record OrchestrationDescriptionUniqueName | ||
{ | ||
/// <summary> | ||
/// Access modifier is set so we nudge consumers from outside Proces Manager to | ||
/// inherit from the record and hopefully create specific implementations per | ||
/// orchestration so we get kind of "named" orchestrations modelled in records. | ||
/// We allow internal use to support easy testing where we then don't have to | ||
/// implement specifci "named" orchestrations. | ||
/// </summary> | ||
protected internal OrchestrationDescriptionUniqueName(string name, int version) | ||
{ | ||
// Explicit guard for empty string | ||
ArgumentException.ThrowIfNullOrWhiteSpace(name); | ||
|
||
Name = name; | ||
Version = version; | ||
} | ||
|
||
/// <summary> | ||
/// A common name to identity the orchestration. | ||
/// </summary> | ||
public string Name { get; } | ||
|
||
/// <summary> | ||
/// A version identifying a specific implementation of the orchestration. | ||
/// </summary> | ||
public int Version { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.