-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate entity state from TaskEntityContext onto its own object
- Loading branch information
Showing
11 changed files
with
115 additions
and
212 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
namespace Microsoft.DurableTask.Entities; | ||
|
||
/// <summary> | ||
/// Represents the persisted state of an entity. | ||
/// </summary> | ||
public abstract class TaskEntityState | ||
{ | ||
/// <summary> | ||
/// Gets the current state for the entity this context is for. This will return <c>null</c> if no state is present, | ||
/// regardless if <paramref name="type"/> is a value-type or not. | ||
/// </summary> | ||
/// <param name="type">The type to retrieve the state as.</param> | ||
/// <returns>The entity state.</returns> | ||
public abstract object? GetState(Type type); | ||
|
||
/// <summary> | ||
/// Sets the entity state. Setting of <c>null</c> will delete entity state. | ||
/// </summary> | ||
/// <param name="state">The state to set.</param> | ||
public abstract void SetState(object? state); | ||
} |
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.