-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Encamina/@fbelizon/event-handling-in-memo…
…ry-storage Added event handler for `MemoryManager` operations.
- Loading branch information
Showing
8 changed files
with
118 additions
and
7 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
22 changes: 22 additions & 0 deletions
22
src/Encamina.Enmarcha.SemanticKernel.Abstractions/Events/MemoryManagerEventArgs.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,22 @@ | ||
namespace Encamina.Enmarcha.SemanticKernel.Abstractions.Events; | ||
|
||
/// <summary> | ||
/// Represents the event arguments of an <see cref="IMemoryManager.MemoryManagerEvent"/>. | ||
/// </summary> | ||
public sealed class MemoryManagerEventArgs : EventArgs | ||
{ | ||
/// <summary> | ||
/// Gets event type. | ||
/// </summary> | ||
public MemoryManagerEventTypes EventType { get; init; } | ||
|
||
/// <summary> | ||
/// Gets the memory identifier. | ||
/// </summary> | ||
public string MemoryId { get; init; } | ||
|
||
/// <summary> | ||
/// Gets the collection name. | ||
/// </summary> | ||
public string CollectionName { get; init; } | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Encamina.Enmarcha.SemanticKernel.Abstractions/Events/MemoryManagerEventTypes.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,32 @@ | ||
namespace Encamina.Enmarcha.SemanticKernel.Abstractions.Events; | ||
|
||
/// <summary> | ||
/// Represents the specific type of operation from a <see cref="IMemoryManager"/>. | ||
/// </summary> | ||
public enum MemoryManagerEventTypes | ||
{ | ||
/// <summary> | ||
/// 'Undefined' event type. | ||
/// </summary> | ||
Undefined = 0, | ||
|
||
/// <summary> | ||
/// 'Get' event type. | ||
/// </summary> | ||
Get = 1, | ||
|
||
/// <summary> | ||
/// 'Upsert' event type. | ||
/// </summary> | ||
Upsert = 2, | ||
|
||
/// <summary> | ||
/// 'UpsertBatch' event type. | ||
/// </summary> | ||
UpsertBatch = 3, | ||
|
||
/// <summary> | ||
/// 'Delete' event type. | ||
/// </summary> | ||
Delete = 4, | ||
} |
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