-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow TransformAction to clone options
When the client is used to query different graph sources the transform action passed to CreateFromConfig can be used to manipulate the keys sent. However the changes are applied to the global options and doesnt reset after the client has finished its query. By introducing a behaviour it is possible to dictatate if the developer wants to be able to apply the transformation on a clone of the options. The default behaviour is that the current behavior where the options are global.
- Loading branch information
1 parent
330133f
commit af7e021
Showing
3 changed files
with
39 additions
and
1 deletion.
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
23 changes: 23 additions & 0 deletions
23
APIs/src/EpiServer.ContentGraph/Configuration/TransformActionBehaviour.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,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace EPiServer.ContentGraph.Configuration | ||
{ | ||
/// <summary> | ||
/// Configures how OptiGraphOptions should handle the output of TransformAction when creating options | ||
/// </summary> | ||
public enum TransformActionBehaviour | ||
{ | ||
/// <summary> | ||
/// Default, transform action changes the global options | ||
/// </summary> | ||
Default, | ||
/// <summary> | ||
/// Clone, transform action clones the options and applies transformation only on the clone | ||
/// </summary> | ||
Clone | ||
} | ||
} |