Untitled
unknown
csharp
2 years ago
1.7 kB
1
Indexable
Never
using SoftwareMind.Infrastructure.Shared; namespace Infrastructure.Shared.Logging.Log4Net { public sealed class Log4NetSharedLibrary : SharedLibrary { public static readonly Log4NetSharedLibrary Instance = new Log4NetSharedLibrary(); public Log4NetSharedLibrary() : base(InfrastructureSharedLibrary.Instance) { var mleko = new DecisionNotification( new DecisionNotificationData { DecitionType = "T", Dw = "chuj" }).SerializeNotification(); } } public enum NotificationType { not1, not2, not3 } public abstract class NotificationBase<TNotificationData> where TNotificationData: NotificationBaseData { private readonly TNotificationData data; public abstract NotificationType Type { get; } protected NotificationBase(TNotificationData data) { this.data = data; } public string SerializeNotification() { //return data.serializeDatatoJson return null; } } public abstract class NotificationBaseData { public string Dw { get; set; } //... } public class DecisionNotificationData : NotificationBaseData { public string DecitionType { get; set; } } public class DecisionNotification : NotificationBase<DecisionNotificationData> { public DecisionNotification(DecisionNotificationData data) : base(data) { } public override NotificationType Type => NotificationType.not1; } }