-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
89 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea | ||
[bB]in | ||
[oO]bj |
22 changes: 22 additions & 0 deletions
22
Trumpee.MassTransit.Messages/Notifications/Template/TemplateFilledEvent.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 Trumpee.MassTransit.Messages.Notifications.Template; | ||
|
||
public class TemplateFilledEvent : Event<TemplateFilledPayload> | ||
{ | ||
public static TemplateFilledEvent GetEvent( | ||
string source, string templateId, string notificationId) | ||
{ | ||
return new TemplateFilledEvent | ||
{ | ||
Id = Guid.NewGuid().ToString("N"), | ||
Action = nameof(TemplateNotFilledEvent).ToLower(), | ||
Source = source, | ||
Timestamp = DateTimeOffset.UtcNow, | ||
Metadata = [], | ||
Payload = new TemplateFilledPayload | ||
{ | ||
TemplateId = templateId, | ||
NotificationId = notificationId | ||
} | ||
}; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Trumpee.MassTransit.Messages/Notifications/Template/TemplateFilledPayload.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,7 @@ | ||
namespace Trumpee.MassTransit.Messages.Notifications.Template; | ||
|
||
public class TemplateFilledPayload | ||
{ | ||
public required string TemplateId { get; set; } | ||
public required string NotificationId { get; set; } | ||
} |
22 changes: 22 additions & 0 deletions
22
Trumpee.MassTransit.Messages/Notifications/Template/TemplateNotFilledEvent.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 Trumpee.MassTransit.Messages.Notifications.Template; | ||
|
||
public class TemplateNotFilledEvent : Event<TemplateNotFilledPayload> | ||
{ | ||
public static TemplateNotFilledEvent GetEvent( | ||
string source, string templateId, string notificationId) | ||
{ | ||
return new TemplateNotFilledEvent | ||
{ | ||
Id = Guid.NewGuid().ToString("N"), | ||
Action = nameof(TemplateNotFilledEvent).ToLower(), | ||
Source = source, | ||
Timestamp = DateTimeOffset.UtcNow, | ||
Metadata = [], | ||
Payload = new TemplateNotFilledPayload | ||
{ | ||
TemplateId = templateId, | ||
NotificationId = notificationId | ||
} | ||
}; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Trumpee.MassTransit.Messages/Notifications/Template/TemplateNotFilledPayload.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,7 @@ | ||
namespace Trumpee.MassTransit.Messages.Notifications.Template; | ||
|
||
public class TemplateNotFilledPayload | ||
{ | ||
public required string TemplateId { get; set; } | ||
public required string NotificationId { get; set; } | ||
} |
21 changes: 21 additions & 0 deletions
21
Trumpee.MassTransit.Messages/Notifications/Template/TemplateNotFoundEvent.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,21 @@ | ||
namespace Trumpee.MassTransit.Messages.Notifications.Template; | ||
|
||
public class TemplateNotFoundEvent : Event<TemplateNotFoundPayload> | ||
{ | ||
public static TemplateNotFoundEvent GetEvent(string source, string templateId, Dictionary<string, string> props) | ||
{ | ||
return new TemplateNotFoundEvent | ||
{ | ||
Id = Guid.NewGuid().ToString("N"), | ||
Action = nameof(TemplateNotFoundEvent).ToLower(), | ||
Source = source, | ||
Timestamp = DateTimeOffset.UtcNow, | ||
Metadata = [], | ||
Payload = new TemplateNotFoundPayload | ||
{ | ||
TemplateId = templateId, | ||
Properties = props | ||
} | ||
}; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Trumpee.MassTransit.Messages/Notifications/Template/TemplateNotFoundPayload.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,7 @@ | ||
namespace Trumpee.MassTransit.Messages.Notifications.Template; | ||
|
||
public class TemplateNotFoundPayload | ||
{ | ||
public required string TemplateId { get; set; } | ||
public Dictionary<string, string>? Properties { get; set; } | ||
} |