diff --git a/net-core/Ical.Net/Ical.Net/Constants.cs b/net-core/Ical.Net/Ical.Net/Constants.cs index a621f9a57..c5c1820d4 100644 --- a/net-core/Ical.Net/Ical.Net/Constants.cs +++ b/net-core/Ical.Net/Ical.Net/Constants.cs @@ -38,7 +38,9 @@ public static class Components public static class EventParticipationStatus { - public const string ParticipationStatus = "PARTSTAT"; + public const string Name = "PARTSTAT"; + public const string Key = "PARTSTAT"; + public static readonly StringComparison Comparison = StringComparison.Ordinal; /// Event needs action public const string NeedsAction = "NEEDS-ACTION"; @@ -51,13 +53,14 @@ public static class EventParticipationStatus /// Event delegated public const string Delegated = "DELEGATED"; - public static string ParamName => ParticipationStatus; public static string Default => NeedsAction; } public static class ToDoParticipationStatus { - public const string ParticipationStatus = "PARTSTAT"; + public const string Name = "PARTSTAT"; + public const string Key = "PARTSTAT"; + public static readonly StringComparison Comparison = StringComparison.Ordinal; /// To-do needs action public const string NeedsAction = "NEEDS-ACTION"; @@ -74,22 +77,19 @@ public static class ToDoParticipationStatus /// To-do in process public const string InProcess = "IN-PROCESS"; - public static string ParamName => ParticipationStatus; public static string Default => NeedsAction; } public static class JournalParticipationStatus { - public const string ParticipationStatus = "PARTSTAT"; + public const string Name = "PARTSTAT"; + public const string Key = "PARTSTAT"; + public static readonly StringComparison Comparison = StringComparison.Ordinal; - /// Event needs action public const string NeedsAction = "NEEDS-ACTION"; - /// Event accepted public const string Accepted = "ACCEPTED"; - /// Event declined public const string Declined = "DECLINED"; - public static string ParamName => ParticipationStatus; public static string Default => NeedsAction; } diff --git a/net-core/Ical.Net/Ical.Net/DataTypes/Attendee.cs b/net-core/Ical.Net/Ical.Net/DataTypes/Attendee.cs index 1aa1adf7f..1c6aa0a5c 100644 --- a/net-core/Ical.Net/Ical.Net/DataTypes/Attendee.cs +++ b/net-core/Ical.Net/Ical.Net/DataTypes/Attendee.cs @@ -149,18 +149,18 @@ public virtual string ParticipationStatus { if (string.IsNullOrEmpty(_participationStatus)) { - _participationStatus = Parameters.Get("PARTSTAT"); + _participationStatus = Parameters.Get(EventParticipationStatus.Key); } return _participationStatus; } set { - if (string.Equals(_participationStatus, value, StringComparison.OrdinalIgnoreCase)) + if (string.Equals(_participationStatus, value, EventParticipationStatus.Comparison)) { return; } _participationStatus = value; - Parameters.Set("PARTSTAT", value); + Parameters.Set(EventParticipationStatus.Key, value); } }