diff --git a/src/.editorconfig b/src/.editorconfig
index a604297..95cae3f 100644
--- a/src/.editorconfig
+++ b/src/.editorconfig
@@ -12,6 +12,7 @@ indent_style = space
charset = utf-8-bom
end_of_line = crlf
indent_size = 4
+tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
@@ -51,6 +52,17 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_readonly_field = true:warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_simplified_interpolation = true:suggestion
+dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
+dotnet_code_quality_unused_parameters = all:error
+
+# Experimental
+dotnet_style_allow_multiple_blank_lines_experimental = false:error
+dotnet_style_allow_statement_immediately_after_block_experimental = false:error
# -- .NET Naming Conventions ---------------------------- #
@@ -72,26 +84,26 @@ dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter
dotnet_naming_style.parameter_style.capitalization = camel_case
dotnet_naming_rule.parameters_are_camel_case.severity = warning
dotnet_naming_rule.parameters_are_camel_case.symbols = parameter_symbol
-dotnet_naming_rule.parameters_are_camel_case.style = parameter_style
+dotnet_naming_rule.parameters_are_camel_case.style = private_field_style
dotnet_naming_symbols.non_interface_type_symbol.applicable_kinds = class,struct,enum,delegate
dotnet_naming_style.non_interface_type_style.capitalization = pascal_case
dotnet_naming_rule.non_interface_types_are_pascal_case.severity = warning
dotnet_naming_rule.non_interface_types_are_pascal_case.symbols = non_interface_type_symbol
-dotnet_naming_rule.non_interface_types_are_pascal_case.style = non_interface_type_style
+dotnet_naming_rule.non_interface_types_are_pascal_case.style = non_private_field_style
dotnet_naming_symbols.interface_type_symbol.applicable_kinds = interface
dotnet_naming_style.interface_type_style.capitalization = pascal_case
dotnet_naming_style.interface_type_style.required_prefix = I
-dotnet_naming_rule.interface_types_must_be_prefixed_with_I.severity = warning
+dotnet_naming_rule.interface_types_must_be_prefixed_with_i.severity = warning
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.symbols = interface_type_symbol
-dotnet_naming_rule.interface_types_must_be_prefixed_with_I.style = interface_type_style
+dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style = interface_type_style
dotnet_naming_symbols.member_symbol.applicable_kinds = method,property,event
dotnet_naming_style.member_style.capitalization = pascal_case
dotnet_naming_rule.members_are_pascal_case.severity = warning
dotnet_naming_rule.members_are_pascal_case.symbols = member_symbol
-dotnet_naming_rule.members_are_pascal_case.style = member_style
+dotnet_naming_rule.members_are_pascal_case.style = non_private_field_style
# -- C# Files ------------------------------------------- #
@@ -167,3 +179,36 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = none
csharp_space_between_square_brackets = false
+
+# General Styling
+csharp_using_directive_placement = outside_namespace:error
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_prefer_static_local_function = true:suggestion
+csharp_style_prefer_switch_expression = true:suggestion
+csharp_style_prefer_pattern_matching = true:suggestion
+csharp_style_prefer_not_pattern = true:error
+csharp_style_prefer_extended_property_pattern = true:suggestion
+csharp_style_namespace_declarations = file_scoped:suggestion
+csharp_style_prefer_method_group_conversion = true:suggestion
+csharp_style_prefer_top_level_statements = false:silent
+csharp_style_prefer_primary_constructors = false:silent
+csharp_style_expression_bodied_lambdas = true:suggestion
+csharp_style_expression_bodied_local_functions = true:suggestion
+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: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:suggestion
+csharp_style_prefer_readonly_struct = true:suggestion
+csharp_style_prefer_readonly_struct_member = true:suggestion
+
+# Experimental
+csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
+csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
+csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
+csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
+csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
diff --git a/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeOffsetProvider.cs b/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeOffsetProvider.cs
index cba7558..b5866d4 100644
--- a/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeOffsetProvider.cs
+++ b/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeOffsetProvider.cs
@@ -2,8 +2,18 @@
namespace JK.Common.DateTimeProviders;
+///
+/// Abstraction to disconnect from the system clock.
+///
public interface IDateTimeOffsetProvider
{
+ ///
+ /// Returns a representing the current date and time.
+ ///
DateTimeOffset Now { get; }
+
+ ///
+ /// Returns a representing the current UTC date and time.
+ ///
DateTimeOffset UtcNow { get; }
}
diff --git a/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeProvider.cs b/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeProvider.cs
index 21756e7..17225f2 100644
--- a/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeProvider.cs
+++ b/src/JK.Common.Abstractions/DateTimeProviders/IDateTimeProvider.cs
@@ -2,9 +2,25 @@
namespace JK.Common.DateTimeProviders;
+///
+/// Abstraction to disconnect from the system clock.
+///
public interface IDateTimeProvider
{
+ ///
+ /// Returns a representing the current date and time.
+ ///
DateTime Now { get; }
+
+ ///
+ /// Returns a DateTime representing the current date. The date part
+ /// of the returned value is the current date, and the time-of-day part of
+ /// the returned value is zero (midnight).
+ ///
DateTime Today { get; }
+
+ ///
+ /// Returns a representing the current UTC date and time.
+ ///
DateTime UtcNow { get; }
}
diff --git a/src/JK.Common.FluentValidation/Validators/AlphabeticalValidator.cs b/src/JK.Common.FluentValidation/Validators/AlphabeticalValidator.cs
index 566fb64..83d6df2 100644
--- a/src/JK.Common.FluentValidation/Validators/AlphabeticalValidator.cs
+++ b/src/JK.Common.FluentValidation/Validators/AlphabeticalValidator.cs
@@ -2,6 +2,9 @@
namespace JK.Common.FluentValidation.Validators;
+///
+/// Validator to determine whether or not a string property contains only alphabetical characters.
+///
public class AlphabeticalValidator : StringValidatorBase
{
///
diff --git a/src/JK.Common.FluentValidation/Validators/NullValidator.cs b/src/JK.Common.FluentValidation/Validators/NullValidator.cs
index 60796da..1875467 100644
--- a/src/JK.Common.FluentValidation/Validators/NullValidator.cs
+++ b/src/JK.Common.FluentValidation/Validators/NullValidator.cs
@@ -2,6 +2,10 @@
namespace JK.Common.FluentValidation.Validators;
+///
+/// Null object pattern AbstractValidator implementation.
+///
+///
public class NullValidator : AbstractValidator
{
}
diff --git a/src/JK.Common.FluentValidation/Validators/SocialSecurityNumberValidator.cs b/src/JK.Common.FluentValidation/Validators/SocialSecurityNumberValidator.cs
index b454912..ce13e28 100644
--- a/src/JK.Common.FluentValidation/Validators/SocialSecurityNumberValidator.cs
+++ b/src/JK.Common.FluentValidation/Validators/SocialSecurityNumberValidator.cs
@@ -2,6 +2,9 @@
namespace JK.Common.FluentValidation.Validators;
+///
+/// Validator to determine whether or not a string property is a valid United States social security number.
+///
public class SocialSecurityNumberValidator : StringValidatorBase
{
///
diff --git a/src/JK.Common.FluentValidation/Validators/StringValidatorBase.cs b/src/JK.Common.FluentValidation/Validators/StringValidatorBase.cs
index eef0fcd..1d6eea8 100644
--- a/src/JK.Common.FluentValidation/Validators/StringValidatorBase.cs
+++ b/src/JK.Common.FluentValidation/Validators/StringValidatorBase.cs
@@ -3,6 +3,9 @@
namespace JK.Common.FluentValidation.Validators;
+///
+/// String property abstract validator.
+///
public abstract class StringValidatorBase : PropertyValidator
{
/// Determine if the given string is valid.
diff --git a/src/JK.Common.FluentValidation/Validators/UnitedStatesPhoneNumberValidator.cs b/src/JK.Common.FluentValidation/Validators/UnitedStatesPhoneNumberValidator.cs
index 80a5f0b..53cd419 100644
--- a/src/JK.Common.FluentValidation/Validators/UnitedStatesPhoneNumberValidator.cs
+++ b/src/JK.Common.FluentValidation/Validators/UnitedStatesPhoneNumberValidator.cs
@@ -2,6 +2,9 @@
namespace JK.Common.FluentValidation.Validators;
+///
+/// Validator to determine whether or not a string property is a valid United States phone number.
+///
public class UnitedStatesPhoneNumberValidator : StringValidatorBase
{
///
diff --git a/src/JK.Common.Tests/Extensions/TypeExtensionsTests.cs b/src/JK.Common.Tests/Extensions/TypeExtensionsTests.cs
index 1027019..636ae58 100644
--- a/src/JK.Common.Tests/Extensions/TypeExtensionsTests.cs
+++ b/src/JK.Common.Tests/Extensions/TypeExtensionsTests.cs
@@ -27,27 +27,6 @@ public void DoesImplement_WithoutInterface_False()
Assert.False(actual);
}
- #endregion
-
- #region IsNullable
-
- [Theory]
- [MemberData(nameof(IsNullable_Data))]
- public void IsNullable_Tests(Type type, bool expected)
- {
- var actual = type.IsNullable();
- Assert.Equal(expected, actual);
- }
-
- public static IEnumerable