-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ForcuraCo/upgrade
Upgrade target frameworks & better `HttpClient` usage
- Loading branch information
Showing
30 changed files
with
548 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# editorconfig dotnet | ||
root = true | ||
|
||
# Default settings: | ||
[*] | ||
insert_final_newline = false | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
############################### | ||
# .NET Coding Conventions # | ||
############################### | ||
|
||
[*.cs] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = crlf | ||
|
||
# organize usings | ||
dotnet_sort_system_directives_first = true | ||
dotnet_separate_import_directive_groups = false | ||
|
||
# this. preferences | ||
dotnet_style_qualification_for_field = false:silent | ||
dotnet_style_qualification_for_property = false:silent | ||
dotnet_style_qualification_for_method = false:silent | ||
dotnet_style_qualification_for_event = false:silent | ||
|
||
# language keywords vs BCL types preferences | ||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent | ||
dotnet_style_predefined_type_for_member_access = true:silent | ||
|
||
# parentheses preferences | ||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent | ||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent | ||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent | ||
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent | ||
|
||
# modifier preferences | ||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent | ||
dotnet_style_readonly_field = true:suggestion | ||
|
||
# expression-level preferences | ||
dotnet_style_object_initializer = true:suggestion | ||
dotnet_style_collection_initializer = true:suggestion | ||
dotnet_style_explicit_tuple_names = true:suggestion | ||
dotnet_style_null_propagation = true:suggestion | ||
dotnet_style_coalesce_expression = true:suggestion | ||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent | ||
dotnet_style_prefer_inferred_tuple_names = true:suggestion | ||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion | ||
dotnet_style_prefer_auto_properties = true:silent | ||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent | ||
dotnet_style_prefer_conditional_expression_over_return = true:silent | ||
|
||
############################### | ||
# Naming Conventions # | ||
############################### | ||
|
||
# style Definitions | ||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case | ||
|
||
# use PascalCase for constant fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style | ||
dotnet_naming_symbols.constant_fields.applicable_kinds = field | ||
dotnet_naming_symbols.constant_fields.applicable_accessibilities = * | ||
dotnet_naming_symbols.constant_fields.required_modifiers = const | ||
|
||
# new line preferences | ||
csharp_new_line_before_open_brace = all | ||
csharp_new_line_before_else = true | ||
csharp_new_line_before_catch = true | ||
csharp_new_line_before_finally = true | ||
csharp_new_line_before_members_in_object_initializers = true | ||
csharp_new_line_before_members_in_anonymous_types = true | ||
csharp_new_line_between_query_expression_clauses = true | ||
|
||
# prefer variable inlining | ||
csharp_style_inlined_variable_declaration = true:suggestion | ||
|
||
# var preferences | ||
csharp_style_var_for_built_in_types = true:silent | ||
csharp_style_var_when_type_is_apparent = true:silent | ||
csharp_style_var_elsewhere = true:silent | ||
|
||
# wrapping preferences | ||
csharp_preserve_single_line_blocks = true | ||
csharp_preserve_single_line_statements = false | ||
|
||
# indentation preferences | ||
csharp_indent_case_contents = true | ||
csharp_indent_switch_labels = true | ||
csharp_indent_labels = flush_left | ||
|
||
# space preferences | ||
csharp_space_after_cast = false | ||
csharp_space_after_colon_in_inheritance_clause = true | ||
csharp_space_after_comma = true | ||
csharp_space_after_dot = false | ||
csharp_space_after_keywords_in_control_flow_statements = true | ||
csharp_space_after_semicolon_in_for_statement = true | ||
csharp_space_around_binary_operators = before_and_after | ||
csharp_space_before_colon_in_inheritance_clause = true | ||
csharp_space_before_comma = false | ||
csharp_space_before_dot = false | ||
csharp_space_before_open_square_brackets = false | ||
csharp_space_before_semicolon_in_for_statement = false | ||
csharp_space_between_empty_square_brackets = false | ||
csharp_space_between_method_call_empty_parameter_list_parentheses = false | ||
csharp_space_between_method_call_name_and_opening_parenthesis = false | ||
csharp_space_between_method_call_parameter_list_parentheses = false | ||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false | ||
csharp_space_between_method_declaration_name_and_open_parenthesis = false | ||
csharp_space_between_method_declaration_parameter_list_parentheses = false | ||
csharp_space_between_square_brackets = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
bin | ||
obj | ||
# ignore build files | ||
[Bb]in/ | ||
[Dd]ebug/ | ||
[Oo]bj/ | ||
[Rr]elease/ | ||
|
||
# ignore user specific files | ||
*.user | ||
*.suo | ||
|
||
# misc | ||
*.nupkg | ||
*.orig | ||
*.dll | ||
Output | ||
TestResults | ||
packages | ||
|
||
# cache/configuration directories | ||
.vscode | ||
.vs | ||
.vs | ||
|
||
# test results/ code coverage | ||
coverage.*.xml | ||
[Cc]overage-[Rr]eport/ | ||
[Tt]est-[Rr]esults/ | ||
[Tt]est[Rr]esults/ | ||
packages | ||
|
||
# nuget configuration | ||
[Nn]u[Gg]et.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
NPPESAPI.net/DependencyInjection/ServiceCollectionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#if NETCOREAPP2_1_OR_GREATER | ||
|
||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace Forcura.NPPES.DependencyInjection | ||
{ | ||
/// <summary> | ||
/// Extensions for registering the <see cref="NPPESApiClient"/> with the <see cref="IServiceCollection"/>. | ||
/// </summary> | ||
public static class ServiceCollectionExtensions | ||
{ | ||
/// <summary> | ||
/// Registers the <see cref="NPPESApiClient"/> with the <see cref="IServiceCollection"/>. | ||
/// </summary> | ||
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param> | ||
/// <returns>The configured <see cref="IServiceCollection"/>.</returns> | ||
public static IServiceCollection AddNPPESApi(this IServiceCollection serviceCollection) | ||
{ | ||
serviceCollection.AddHttpClient<NPPESApiClient>(); | ||
|
||
return serviceCollection; | ||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
namespace Forcura.NPPES.Models | ||
{ | ||
/// <summary> | ||
/// Describes an identifier of the NPI entry. | ||
/// </summary> | ||
public class NPPESIdentifier | ||
{ | ||
/// <summary> | ||
/// The identifier. | ||
/// </summary> | ||
public string Identifier { get; set; } | ||
|
||
/// <summary> | ||
/// The code. | ||
/// </summary> | ||
public string Code { get; set; } | ||
|
||
/// <summary> | ||
/// The state. | ||
/// </summary> | ||
public string State { get; set; } | ||
|
||
/// <summary> | ||
/// The issuer. | ||
/// </summary> | ||
public string Issuer { get; set; } | ||
|
||
/// <summary> | ||
/// The description. | ||
/// </summary> | ||
public string Description { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,48 @@ | ||
namespace Forcura.NPPES.Models | ||
{ | ||
/// <summary> | ||
/// Other names associated to the NPI. | ||
/// </summary> | ||
public class NPPESOtherName | ||
{ | ||
/// <summary> | ||
/// The organization name. | ||
/// </summary> | ||
public string OrganizationName { get; set; } | ||
|
||
/// <summary> | ||
/// The code. | ||
/// </summary> | ||
public string Code { get; set; } | ||
|
||
/// <summary> | ||
/// The last name. | ||
/// </summary> | ||
public string LastName { get; set; } | ||
|
||
/// <summary> | ||
/// The first name. | ||
/// </summary> | ||
public string FirstName { get; set; } | ||
|
||
/// <summary> | ||
/// The middle name. | ||
/// </summary> | ||
public string MiddleName { get; set; } | ||
|
||
/// <summary> | ||
/// The name prefix. | ||
/// </summary> | ||
public string Prefix { get; set; } | ||
|
||
/// <summary> | ||
/// The name suffix. | ||
/// </summary> | ||
public string Suffix { get; set; } | ||
|
||
/// <summary> | ||
/// The credentials. | ||
/// </summary> | ||
public string Credential { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.