Skip to content

Commit

Permalink
.NET 8 and nullable reference types support
Browse files Browse the repository at this point in the history
  • Loading branch information
EWSoftware committed Jan 9, 2025
1 parent f673661 commit 579ea8b
Show file tree
Hide file tree
Showing 261 changed files with 5,034 additions and 5,296 deletions.
76 changes: 34 additions & 42 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,30 @@ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

# Code style settings
Expand All @@ -92,9 +92,9 @@ dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:none
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_namespace_match_folder = true:none
dotnet_style_operator_placement_when_wrapping = beginning_of_line

# "This." and "Me." qualification. Use is preferred where true but the lightbulbs tend to show up in places
Expand All @@ -111,58 +111,50 @@ dotnet_diagnostic.CA1303.severity = none
# IDE0010: Add missing cases
dotnet_diagnostic.IDE0010.severity = none

# IDE0032: Use auto property
dotnet_diagnostic.IDE0032.severity = none

# IDE0045: Convert to conditional expression
dotnet_diagnostic.IDE0045.severity = none

# IDE0046: Convert to conditional expression
dotnet_diagnostic.IDE0046.severity = none

# IDE0047: Remove unnecessary parentheses
dotnet_diagnostic.IDE0047.severity = none

# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = none

# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none

# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = none

# These are disabled as we're still targeting .NET Framework as well and I don't want a lot of conditional code
# to suppress these.
# to suppress these or I'm not ready to use them just yet.
# IDE0056: Use index operator
dotnet_diagnostic.IDE0056.severity = none

# IDE0057: Use range operator
dotnet_diagnostic.IDE0057.severity = none

# IDE0063: Use simple 'using' statement
dotnet_diagnostic.IDE0063.severity = none

# IDE0066: Convert switch statement to expression
dotnet_diagnostic.IDE0066.severity = none

# IDE0074: Use compound assignment
dotnet_diagnostic.IDE0074.severity = none

# IDE0090: Use 'new(...)'
dotnet_diagnostic.IDE0090.severity = none
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = none

# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = none

# CA1846: Prefer 'AsSpan' over 'Substring'
dotnet_diagnostic.CA1846.severity = none

# CA1863: Use 'CompositeFormat'
dotnet_diagnostic.CA1863.severity = none

# CA1865: Use char overload
dotnet_diagnostic.CA1865.severity = none

# CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
dotnet_diagnostic.CA2249.severity = none

# SYSLIB1045: Convert to 'GeneratedRegexAttribute'.
dotnet_diagnostic.SYSLIB1045.severity = none

# SYSLIB1054: Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
dotnet_diagnostic.SYSLIB1054.severity = none

[*.cs]
# CSharp code style settings
csharp_style_var_elsewhere = false:none
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = false:none
csharp_style_prefer_primary_constructors = false:none

csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = false:none
Expand All @@ -187,15 +179,15 @@ csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:none
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent

csharp_prefer_braces = when_multiline:none
csharp_prefer_simple_default_expression = true:suggestion
csharp_prefer_simple_using_statement = true:none
csharp_prefer_simple_using_statement = true:suggestion
csharp_preserve_single_line_blocks = true
csharp_using_directive_placement = outside_namespace:silent

Expand Down
5 changes: 5 additions & 0 deletions Doc/Content/VersionHistory/VersionHistory.aml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Data Interchange (PDI) Library </legacyBold> over the life of the project.</para
<para>Select a version below to see a description of its changes.</para>

<list class="bullet">
<listItem>
<para>
<link xlink:href="54933123-5d15-4a68-b3b4-53e6a583ee01" />
</para>
</listItem>
<listItem>
<para>
<link xlink:href="d1d9a1d2-7495-457e-9095-880ab00515a3" />
Expand Down
33 changes: 33 additions & 0 deletions Doc/Content/VersionHistory/v2025.1.9.0.aml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="54933123-5d15-4a68-b3b4-53e6a583ee01" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>Release notes for version 2025.1.9.0.</para>
</introduction>

<section>
<content>
<list class="bullet">
<listItem>
<para>Removed support for .NET 6 and added support for .NET 8 and later.</para>
</listItem>

<listItem>
<para>Enabled nullable reference types in all projects and updated the classes to support them.</para>
</listItem>

<listItem>
<para>Fixed an inconsistency with how the version property was applied when parsing vCard files.</para>
</listItem>

</list>

</content>
</section>

<relatedTopics>
<link xlink:href="8885fe94-537b-45a2-84e9-112fa9c976ff" />
</relatedTopics>

</developerConceptualDocument>
</topic>
7 changes: 6 additions & 1 deletion Doc/ContentLayout.content
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@
<HelpKeyword index="K" term="history" />
<HelpKeyword index="K" term="version history" />
</HelpKeywords>
<Topic id="d1d9a1d2-7495-457e-9095-880ab00515a3" visible="True" isSelected="true" title="Version 2023.1.2.0">
<Topic id="54933123-5d15-4a68-b3b4-53e6a583ee01" visible="True" isSelected="true" title="Version 2025.1.9.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2025.1.9.0" />
</HelpKeywords>
</Topic>
<Topic id="d1d9a1d2-7495-457e-9095-880ab00515a3" visible="True" title="Version 2023.1.2.0">
<HelpKeywords>
<HelpKeyword index="K" term="versions, 2023.1.2.0" />
</HelpKeywords>
Expand Down
5 changes: 3 additions & 2 deletions Doc/EWSoftwarePDI.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<FrameworkVersion>.NET Framework 4.0</FrameworkVersion>
<HelpTitle>EWSoftware.PDI Namespace Documentation</HelpTitle>
<CopyrightHref>https://github.com/EWSoftware/PDI</CopyrightHref>
<CopyrightText>[v{%40HelpFileVersion}] Copyright \xA9 2003-2023, Eric Woodruff, All Rights Reserved</CopyrightText>
<CopyrightText>[v{%40HelpFileVersion}] Copyright \xA9 2003-2025, Eric Woodruff, All Rights Reserved</CopyrightText>
<FeedbackEMailAddress>Eric%40EWoodruff.us</FeedbackEMailAddress>
<PresentationStyle>Default2022</PresentationStyle>
<SyntaxFilters>Standard</SyntaxFilters>
Expand All @@ -49,7 +49,7 @@
<NamespaceSummaryItem name="EWSoftware.PDI.Web.Design" isDocumented="True">Personal Data Interchange ASP.NET web server control designers developed by Eric Woodruff.</NamespaceSummaryItem>
<NamespaceSummaryItem name="EWSoftware.PDI.Windows.Forms" isDocumented="True">Personal Data Interchange Windows Forms controls developed by Eric Woodruff.</NamespaceSummaryItem>
</NamespaceSummaries>
<HelpFileVersion>2022.1.2.0</HelpFileVersion>
<HelpFileVersion>2025.1.9.0</HelpFileVersion>
<ApiFilter />
<PlugInConfigurations>
<PlugInConfig id="Output Deployment" enabled="True">
Expand Down Expand Up @@ -195,6 +195,7 @@
<None Include="Content\VersionHistory\v2020.7.24.0.aml" />
<None Include="Content\VersionHistory\v2021.11.23.0.aml" />
<None Include="Content\VersionHistory\v2023.1.2.0.aml" />
<None Include="Content\VersionHistory\v2025.1.9.0.aml" />
<None Include="Content\Welcome.aml" />
<None Include="Content\VersionHistory\v2.0.0.2.aml" />
<None Include="Content\VersionHistory\v2.0.0.0.aml" />
Expand Down
10 changes: 10 additions & 0 deletions IgnoredWords.dic
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
busys
Dest
ics
iso
loc
Mins
navbar
nd
pdi
pid
relateds
rdt
todos
tos
tz
tzid
utc
utils
vcalendar
vcard
Expand Down
6 changes: 0 additions & 6 deletions MasterBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ DEL Source\EWSPDIData\bin\Release\*.nupkg
DEL Source\EWSPDIWeb\bin\Release\*.nupkg
DEL Source\EWSPDIWinForms\bin\Release\*.nupkg

IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current" SET "MSBUILD=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current" SET "MSBUILD=%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current" SET "MSBUILD=%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\bin\MSBuild.exe"
IF EXIST "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current" SET "MSBUILD=%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin\MSBuild.exe"
Expand Down
21 changes: 12 additions & 9 deletions Source/CSharpDemos/CalendarBrowser/AboutDlg.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//===============================================================================================================
// File : AboutDlg.cs
// Author : Eric Woodruff
// Updated : 11/23/2018
// Note : Copyright 2004-2018, Eric Woodruff, All rights reserved
// Compiler: Microsoft Visual C#
// Updated : 01/05/2025
// Note : Copyright 2004-2025, Eric Woodruff, All rights reserved
//
// This form is used to display application version information
//
Expand Down Expand Up @@ -50,13 +49,13 @@ public AboutDlg()
private void AboutDlg_Load(object sender, EventArgs e)
{
// Get assembly information not available from the application object
Assembly asm = Assembly.GetEntryAssembly();
Assembly asm = Assembly.GetEntryAssembly()!;
AssemblyTitleAttribute title = (AssemblyTitleAttribute)
AssemblyTitleAttribute.GetCustomAttribute(asm, typeof(AssemblyTitleAttribute));
Attribute.GetCustomAttribute(asm, typeof(AssemblyTitleAttribute))!;
AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)
AssemblyCopyrightAttribute.GetCustomAttribute(asm, typeof(AssemblyCopyrightAttribute));
Attribute.GetCustomAttribute(asm, typeof(AssemblyCopyrightAttribute))!;
AssemblyDescriptionAttribute desc = (AssemblyDescriptionAttribute)
AssemblyDescriptionAttribute.GetCustomAttribute(asm, typeof(AssemblyDescriptionAttribute));
Attribute.GetCustomAttribute(asm, typeof(AssemblyDescriptionAttribute))!;

// Set the labels
lblName.Text = title.Title;
Expand All @@ -68,7 +67,7 @@ private void AboutDlg_Load(object sender, EventArgs e)
foreach(AssemblyName an in asm.GetReferencedAssemblies())
{
ListViewItem lvi = lvComponents.Items.Add(an.Name);
lvi.SubItems.Add(an.Version.ToString());
lvi.SubItems.Add(an.Version!.ToString());
}

lvComponents.Sorting = SortOrder.Ascending;
Expand Down Expand Up @@ -109,7 +108,11 @@ private void lnkHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
try
{
// Launch the e-mail URL, this will fail if user does not have an association for e-mail URLs
System.Diagnostics.Process.Start((string)e.Link.LinkData);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = (string)e.Link!.LinkData!,
UseShellExecute = true,
});
}
catch(Exception ex)
{
Expand Down
Loading

0 comments on commit 579ea8b

Please sign in to comment.