diff --git a/.editorconfig b/.editorconfig index ad25438..b092e58 100644 --- a/.editorconfig +++ b/.editorconfig @@ -127,6 +127,8 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false csharp_preserve_single_line_statements = true csharp_preserve_single_line_blocks = true csharp_style_namespace_declarations = file_scoped +# Do not suggest primary constructor +dotnet_diagnostic.IDE0290.severity = none ############################### # VB Coding Conventions # diff --git a/Calendare.VSyntaxReader.sln b/Calendare.VSyntaxReader.sln deleted file mode 100644 index 9aed9f7..0000000 --- a/Calendare.VSyntaxReader.sln +++ /dev/null @@ -1,34 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSyntaxReader.Examples", "VSyntaxReader.Examples\VSyntaxReader.Examples.csproj", "{176265F3-B879-4B62-B38D-3A1A338753AB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSyntaxReader", "VSyntaxReader\VSyntaxReader.csproj", "{7DCA2674-89AE-40B1-A330-44FC3ACA15BE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSyntaxReader.Tests", "VSyntaxReader.Tests\VSyntaxReader.Tests.csproj", "{B1F4BCEA-1FDE-4DA8-B27E-44253B4F37C2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {176265F3-B879-4B62-B38D-3A1A338753AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {176265F3-B879-4B62-B38D-3A1A338753AB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {176265F3-B879-4B62-B38D-3A1A338753AB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {176265F3-B879-4B62-B38D-3A1A338753AB}.Release|Any CPU.Build.0 = Release|Any CPU - {7DCA2674-89AE-40B1-A330-44FC3ACA15BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7DCA2674-89AE-40B1-A330-44FC3ACA15BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7DCA2674-89AE-40B1-A330-44FC3ACA15BE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7DCA2674-89AE-40B1-A330-44FC3ACA15BE}.Release|Any CPU.Build.0 = Release|Any CPU - {B1F4BCEA-1FDE-4DA8-B27E-44253B4F37C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1F4BCEA-1FDE-4DA8-B27E-44253B4F37C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1F4BCEA-1FDE-4DA8-B27E-44253B4F37C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1F4BCEA-1FDE-4DA8-B27E-44253B4F37C2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Calendare.VSyntaxReader.slnx b/Calendare.VSyntaxReader.slnx new file mode 100644 index 0000000..807c84b --- /dev/null +++ b/Calendare.VSyntaxReader.slnx @@ -0,0 +1,5 @@ + + + + + diff --git a/VSyntaxReader/Properties/DateTimeProperty.cs b/VSyntaxReader/Properties/DateTimeProperty.cs index be1bd15..44b1969 100644 --- a/VSyntaxReader/Properties/DateTimeProperty.cs +++ b/VSyntaxReader/Properties/DateTimeProperty.cs @@ -81,7 +81,7 @@ public DeserializeResult Deserialize(ICalendarComponent calendarComponent) public string Serialize() { - return DateTimePropertyHelper.Serialize(Raw, DataType, DefaultDataType, [Value], IsValid); + return DateTimePropertyHelper.Serialize(Raw, DataType, DefaultDataType, Value is not null ? [Value] : [], IsValid); } public IProperty DeepClone() => Copy(); diff --git a/VSyntaxReader/Properties/FreeBusyProperty.cs b/VSyntaxReader/Properties/FreeBusyProperty.cs index 4fb84d6..938ee6f 100644 --- a/VSyntaxReader/Properties/FreeBusyProperty.cs +++ b/VSyntaxReader/Properties/FreeBusyProperty.cs @@ -33,7 +33,7 @@ public FreeBusyProperty(CalendarObject calendarObject) public DeserializeResult Deserialize(ICalendarComponent calendarComponent) { Value = new CaldavFreeBusy(); - List values = [Raw.Value]; + List values = []; if (Raw.Value is not null) { values = [.. Raw.Value.Split(',')]; diff --git a/VSyntaxReader/Properties/RecurrenceDateProperty.cs b/VSyntaxReader/Properties/RecurrenceDateProperty.cs index b87ab4c..6f21370 100644 --- a/VSyntaxReader/Properties/RecurrenceDateProperty.cs +++ b/VSyntaxReader/Properties/RecurrenceDateProperty.cs @@ -87,7 +87,7 @@ public DeserializeResult Deserialize(ICalendarComponent calendarComponent) return hasValidTimezone; } - List values = [Raw.Value]; + List values = []; var deserializeResult = new DeserializeResult(true); if (Raw.Value is not null) {