-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented AutoOffsetReset Property in server and activity (#3665)
Co-authored-by: Yannick Laubscher <yannick.laubscher@swissteach.ch>
- Loading branch information
Showing
8 changed files
with
78 additions
and
37 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...s/Elsa.Activities.Kafka/Activities/KafkaMessageReceived/AutoOffsetResetOptionsProvider.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.Collections.Generic; | ||
using System.Reflection; | ||
using Confluent.Kafka; | ||
using Elsa.Design; | ||
using Elsa.Metadata; | ||
|
||
namespace Elsa.Activities.Kafka.Activities.KafkaMessageReceived; | ||
|
||
/// <summary> | ||
/// Provides a List of SelectListItem for each AutoOffsetReset enum item. | ||
/// This is used to populate the dropdown list in the designer. | ||
/// </summary> | ||
public class AutoOffsetResetOptionsProvider : IActivityPropertyOptionsProvider | ||
{ | ||
public object? GetOptions(PropertyInfo property) | ||
{ | ||
return new List<SelectListItem>() | ||
{ | ||
new SelectListItem(nameof(AutoOffsetReset.Earliest),((int)AutoOffsetReset.Earliest).ToString()), | ||
new SelectListItem(nameof(AutoOffsetReset.Latest),((int)AutoOffsetReset.Latest).ToString()), | ||
}; | ||
} | ||
} |
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