From fa3e4db3cf793e35bb260992cebfac3305ac40d8 Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Wed, 29 May 2024 22:55:42 +0800 Subject: [PATCH 1/6] Adds .editorconfig file --- .editorconfig | 227 ++++++++++++++++++ ...rosoft.FeatureManagement.AspNetCore.csproj | 5 + .../Microsoft.FeatureManagement.csproj | 5 + 3 files changed, 237 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..eb658173 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,227 @@ +# editorconfig.org + +# top-most EditorConfig file +root = true + +### Default settings: +[*] +insert_final_newline = true +trim_trailing_whitespace = true +end_of_line = crlf +indent_style = space + +# C# files +[*.cs] +indent_size = 4 + +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules + +# 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 + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = false +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# 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_around_declaration_statements = false +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_parentheses = false +csharp_space_between_square_brackets = false + +# 'Using' directive preferences +dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = false + +# Remove unnecessary import +dotnet_diagnostic.IDE0005.severity = warning + +# License header +dotnet_diagnostic.IDE0073.severity = warning +file_header_template = Copyright (c) Microsoft Corporation. All Rights Reserved.\nLicensed under the MIT license. + +# Code style defaults +csharp_prefer_braces = true:suggestion +csharp_prefer_static_local_function = true:suggestion +csharp_style_prefer_switch_expression = true:suggestion +dotnet_style_readonly_field = true:warning +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +# Expression-level preferences +dotnet_diagnostic.IDE0001.severity = warning # simplify name +dotnet_diagnostic.IDE0002.severity = warning # simplify member access +dotnet_diagnostic.IDE0004.severity = warning # remove unnecessary cast +dotnet_style_operator_placement_when_wrapping = end_of_line +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion + +# Expression-bodied members +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent + +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion + +# Avoid this. unless absolutely necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# New-line preferences +dotnet_style_allow_multiple_blank_lines_experimental = false:warning +csharp_style_allow_embedded_statements_on_same_line_experimental = false:warning +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning +dotnet_style_allow_statement_immediately_after_block_experimental = false:warning +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:warning +csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false:warning +csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false:warning + +# Types: use keywords instead of BCL types, and permit var only when the type is clear +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:warning +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Null checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Pascal case naming rule +dotnet_naming_style.ipascalcase.required_prefix = I +dotnet_naming_style.ipascalcase.capitalization = pascal_case + +dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = warning +dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces +dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase +dotnet_naming_symbols.interfaces.applicable_kinds = interface + +dotnet_naming_style.pascalcase.capitalization = pascal_case + +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = warning +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces +dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase +dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, enum + +dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase +dotnet_naming_symbols.non_field_members.applicable_kinds = property, method + +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = warning +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields +dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase +dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected +dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static + +dotnet_naming_rule.constants_should_be_pascalcase.severity = warning +dotnet_naming_rule.constantss_should_be_pascalcase.symbols = constants +dotnet_naming_rule.constants_should_be_pascalcase.style = pascalcase +dotnet_naming_symbols.constants.required_modifiers = const + +# Camel case naming rule +dotnet_naming_style._camelcase.required_prefix = _ +dotnet_naming_style._camelcase.capitalization = camel_case + +dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion +dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields +dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected + +dotnet_naming_style.camelcase.capitalization = camel_case + +dotnet_naming_rule.parameters_should_be_camelcase.severity = warning +dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters +dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase +dotnet_naming_symbols.parameters.applicable_kinds = parameter +dotnet_naming_symbols.parameters.applicable_accessibilities = * + +dotnet_naming_rule.local_variables_should_be_camelcase.severity = warning +dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables +dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase +dotnet_naming_symbols.local_variables.applicable_kinds = local +dotnet_naming_symbols.local_variables.applicable_accessibilities = local + +# Xml project files +[*.csproj] +indent_size = 2 +charset = utf-8 + +# Xml build files +[*.builds] +indent_size = 2 + +# Xml files +[*.xml] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# YAML config files +[*.{yml,yaml}] +indent_size = 2 + +# JSON config files +[*.json] +indent_size = 2 + +# Shell scripts +[*.sh] +end_of_line = lf +[*.{cmd,bat}] +end_of_line = crlf \ No newline at end of file diff --git a/src/Microsoft.FeatureManagement.AspNetCore/Microsoft.FeatureManagement.AspNetCore.csproj b/src/Microsoft.FeatureManagement.AspNetCore/Microsoft.FeatureManagement.AspNetCore.csproj index 94d93f15..5c81a496 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/Microsoft.FeatureManagement.AspNetCore.csproj +++ b/src/Microsoft.FeatureManagement.AspNetCore/Microsoft.FeatureManagement.AspNetCore.csproj @@ -39,6 +39,11 @@ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\XMLComments\$(MSBuildProjectName).xml + + + 6.0 + True + diff --git a/src/Microsoft.FeatureManagement/Microsoft.FeatureManagement.csproj b/src/Microsoft.FeatureManagement/Microsoft.FeatureManagement.csproj index 528a3448..406e0781 100644 --- a/src/Microsoft.FeatureManagement/Microsoft.FeatureManagement.csproj +++ b/src/Microsoft.FeatureManagement/Microsoft.FeatureManagement.csproj @@ -46,6 +46,11 @@ bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\XMLComments\$(MSBuildProjectName).xml + + 5.0 + True + + From bcf7427c8e8cc988707750b7c5745f96789d4e77 Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Wed, 29 May 2024 23:21:25 +0800 Subject: [PATCH 2/6] whitespace format --- .editorconfig | 17 ++++------ examples/BlazorServerApp/BrowserFilter.cs | 2 +- examples/BlazorServerApp/Program.cs | 2 +- examples/ConsoleApp/AccountServiceContext.cs | 2 +- examples/ConsoleApp/Program.cs | 2 +- .../Controllers/BetaController.cs | 2 +- .../FeatureFlagDemo/Models/ErrorViewModel.cs | 2 +- .../Views/Shared/Error.cshtml.cs | 2 +- examples/RazorPages/Pages/Error.cshtml.cs | 2 +- examples/RazorPages/Pages/Index.cshtml.cs | 2 +- examples/RazorPages/Pages/Privacy.cshtml.cs | 2 +- examples/TargetingConsoleApp/Program.cs | 2 +- .../AssemblyInfo.cs | 4 +-- .../ConfigurationFeatureDefinitionProvider.cs | 4 +-- .../ConfigurationFields.cs | 2 +- .../ConfigurationWrapper.cs | 2 +- .../FeatureFilters/ISystemClock.cs | 2 +- .../FeatureManagementBuilder.cs | 2 +- .../FeatureManager.cs | 12 ++++--- .../IFilterParametersBinder.cs | 2 +- .../MicrosoftFeatureManagementFields.cs | 2 +- .../ServiceCollectionExtensions.cs | 32 +++++++++---------- .../CustomTargetingFilter.cs | 2 +- .../FeatureManagement.cs | 18 +++++------ .../RecurrenceEvaluation.cs | 2 +- 25 files changed, 60 insertions(+), 65 deletions(-) diff --git a/.editorconfig b/.editorconfig index eb658173..2e175471 100644 --- a/.editorconfig +++ b/.editorconfig @@ -159,17 +159,12 @@ dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_me dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase dotnet_naming_symbols.non_field_members.applicable_kinds = property, method -dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = warning -dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields -dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase -dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field -dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected -dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static - -dotnet_naming_rule.constants_should_be_pascalcase.severity = warning -dotnet_naming_rule.constantss_should_be_pascalcase.symbols = constants -dotnet_naming_rule.constants_should_be_pascalcase.style = pascalcase -dotnet_naming_symbols.constants.required_modifiers = const +dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion +dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants +dotnet_naming_rule.local_constants_should_be_camelcase.style = pascalcase +dotnet_naming_symbols.local_constants.applicable_kinds = local +dotnet_naming_symbols.local_constants.applicable_accessibilities = local +dotnet_naming_symbols.local_constants.required_modifiers = const # Camel case naming rule dotnet_naming_style._camelcase.required_prefix = _ diff --git a/examples/BlazorServerApp/BrowserFilter.cs b/examples/BlazorServerApp/BrowserFilter.cs index 5105b8a8..376f323e 100644 --- a/examples/BlazorServerApp/BrowserFilter.cs +++ b/examples/BlazorServerApp/BrowserFilter.cs @@ -45,7 +45,7 @@ private static bool IsChromeBrowser(string userAgentContext) return false; } - return userAgentContext.Contains("chrome", StringComparison.OrdinalIgnoreCase) && + return userAgentContext.Contains("chrome", StringComparison.OrdinalIgnoreCase) && !userAgentContext.Contains("edg", StringComparison.OrdinalIgnoreCase); } diff --git a/examples/BlazorServerApp/Program.cs b/examples/BlazorServerApp/Program.cs index 4a66f68c..1dfd1c43 100644 --- a/examples/BlazorServerApp/Program.cs +++ b/examples/BlazorServerApp/Program.cs @@ -48,4 +48,4 @@ public static void Main(string[] args) app.Run(); } } -} \ No newline at end of file +} diff --git a/examples/ConsoleApp/AccountServiceContext.cs b/examples/ConsoleApp/AccountServiceContext.cs index 85114371..95f85a33 100644 --- a/examples/ConsoleApp/AccountServiceContext.cs +++ b/examples/ConsoleApp/AccountServiceContext.cs @@ -4,4 +4,4 @@ class AccountServiceContext : IAccountContext { public string AccountId { get; set; } -} \ No newline at end of file +} diff --git a/examples/ConsoleApp/Program.cs b/examples/ConsoleApp/Program.cs index 12028ca2..93152719 100644 --- a/examples/ConsoleApp/Program.cs +++ b/examples/ConsoleApp/Program.cs @@ -49,4 +49,4 @@ // Output results Console.WriteLine($"The {FeatureName} feature is {(enabled ? "enabled" : "disabled")} for the '{account}' account."); } -} \ No newline at end of file +} diff --git a/examples/FeatureFlagDemo/Controllers/BetaController.cs b/examples/FeatureFlagDemo/Controllers/BetaController.cs index 9b69d9cf..4fed13f8 100644 --- a/examples/FeatureFlagDemo/Controllers/BetaController.cs +++ b/examples/FeatureFlagDemo/Controllers/BetaController.cs @@ -7,7 +7,7 @@ namespace FeatureFlagDemo.Controllers { - public class BetaController: Controller + public class BetaController : Controller { private readonly IFeatureManager _featureManager; diff --git a/examples/FeatureFlagDemo/Models/ErrorViewModel.cs b/examples/FeatureFlagDemo/Models/ErrorViewModel.cs index 17542f32..3a9076f6 100644 --- a/examples/FeatureFlagDemo/Models/ErrorViewModel.cs +++ b/examples/FeatureFlagDemo/Models/ErrorViewModel.cs @@ -11,4 +11,4 @@ public class ErrorViewModel public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); } -} \ No newline at end of file +} diff --git a/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs b/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs index ae038094..b8df250f 100644 --- a/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs +++ b/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs @@ -24,4 +24,4 @@ public void OnGet() RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; } } -} \ No newline at end of file +} diff --git a/examples/RazorPages/Pages/Error.cshtml.cs b/examples/RazorPages/Pages/Error.cshtml.cs index 74050d52..149f1f23 100644 --- a/examples/RazorPages/Pages/Error.cshtml.cs +++ b/examples/RazorPages/Pages/Error.cshtml.cs @@ -24,4 +24,4 @@ public void OnGet() RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; } } -} \ No newline at end of file +} diff --git a/examples/RazorPages/Pages/Index.cshtml.cs b/examples/RazorPages/Pages/Index.cshtml.cs index 05dd8805..55bed039 100644 --- a/examples/RazorPages/Pages/Index.cshtml.cs +++ b/examples/RazorPages/Pages/Index.cshtml.cs @@ -18,4 +18,4 @@ public void OnGet() } } -} \ No newline at end of file +} diff --git a/examples/RazorPages/Pages/Privacy.cshtml.cs b/examples/RazorPages/Pages/Privacy.cshtml.cs index c1cd207f..2e8f5214 100644 --- a/examples/RazorPages/Pages/Privacy.cshtml.cs +++ b/examples/RazorPages/Pages/Privacy.cshtml.cs @@ -16,4 +16,4 @@ public void OnGet() { } } -} \ No newline at end of file +} diff --git a/examples/TargetingConsoleApp/Program.cs b/examples/TargetingConsoleApp/Program.cs index 5b89807a..d8ee6359 100644 --- a/examples/TargetingConsoleApp/Program.cs +++ b/examples/TargetingConsoleApp/Program.cs @@ -54,4 +54,4 @@ // Output results Console.WriteLine($"The {FeatureName} feature is {(enabled ? "enabled" : "disabled")} for the user '{userId}'."); } -} \ No newline at end of file +} diff --git a/src/Microsoft.FeatureManagement/AssemblyInfo.cs b/src/Microsoft.FeatureManagement/AssemblyInfo.cs index 955518ef..75bfb2fa 100644 --- a/src/Microsoft.FeatureManagement/AssemblyInfo.cs +++ b/src/Microsoft.FeatureManagement/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // using System.Runtime.CompilerServices; @@ -9,4 +9,4 @@ "3ae70fbea5662f61dd9d640de2205b7bd5359a43dda006e51d83d1f5f7a7d3f849267a0a28676d" + "cf49727a32487d4c75c4aacd5febb0069e1adc66ec63bbd18ec2276091a0e3c1326aa626c9e4db" + "800714a134f2a81e405f35752b55220021923429cb61776cd2fa66d25c335f8dc27bb92292905a" + -"3798d896")] \ No newline at end of file +"3798d896")] diff --git a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs index 3ae10329..eeea028a 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs @@ -381,8 +381,8 @@ private IEnumerable GetFeatureDefinitionSections() .FirstOrDefault(section => string.Equals( section.Key, - _microsoftFeatureManagementSchemaEnabled ? - MicrosoftFeatureManagementFields.FeatureManagementSectionName : + _microsoftFeatureManagementSchemaEnabled ? + MicrosoftFeatureManagementFields.FeatureManagementSectionName : ConfigurationFields.FeatureManagementSectionName, StringComparison.OrdinalIgnoreCase)); diff --git a/src/Microsoft.FeatureManagement/ConfigurationFields.cs b/src/Microsoft.FeatureManagement/ConfigurationFields.cs index a5472cd8..8b6ba82c 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationFields.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationFields.cs @@ -17,4 +17,4 @@ internal static class ConfigurationFields public const string NameKeyword = "Name"; public const string FeatureManagementSectionName = "FeatureManagement"; } -} \ No newline at end of file +} diff --git a/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs b/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs index 99f0b2a6..a7bd61bf 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs @@ -36,4 +36,4 @@ public IChangeToken GetReloadToken() => public IConfigurationSection GetSection(string key) => _configuration.GetSection(key); } -} \ No newline at end of file +} diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs b/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs index 50c6743d..1fc9b667 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs @@ -17,4 +17,4 @@ internal interface ISystemClock /// public DateTimeOffset UtcNow { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs b/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs index 2b2af56c..b7b3b29b 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs @@ -35,7 +35,7 @@ public IFeatureManagementBuilder AddFeatureFilter() where T : IFeatureFilterM } IEnumerable featureFilterImplementations = implementationType.GetInterfaces() - .Where(i => i == typeof(IFeatureFilter) || + .Where(i => i == typeof(IFeatureFilter) || (i.IsGenericType && i.GetGenericTypeDefinition().IsAssignableFrom(typeof(IContextualFeatureFilter<>)))); if (featureFilterImplementations.Count() > 1) diff --git a/src/Microsoft.FeatureManagement/FeatureManager.cs b/src/Microsoft.FeatureManagement/FeatureManager.cs index ef850a03..bad2a94c 100644 --- a/src/Microsoft.FeatureManagement/FeatureManager.cs +++ b/src/Microsoft.FeatureManagement/FeatureManager.cs @@ -144,7 +144,7 @@ private async Task IsEnabledAsync(string feature, TContext appCo if (featureDefinition.RequirementType == RequirementType.All && _options.IgnoreMissingFeatureFilters) { throw new FeatureManagementException( - FeatureManagementError.Conflict, + FeatureManagementError.Conflict, $"The 'IgnoreMissingFeatureFilters' flag cannot use used in combination with a feature of requirement type 'All'."); } @@ -183,7 +183,7 @@ private async Task IsEnabledAsync(string feature, TContext appCo enabled = true; break; } - + continue; } @@ -268,7 +268,7 @@ await contextualFilter.EvaluateAsync(context, appContext).ConfigureAwait(false) { throw new FeatureManagementException(FeatureManagementError.MissingFeature, errorMessage); } - + Logger?.LogDebug(errorMessage); } @@ -335,7 +335,8 @@ private IFeatureFilterMetadata GetFeatureFilterMetadata(string filterName, Type { IFeatureFilterMetadata filter = _filterMetadataCache.GetOrAdd( $"{filterName}{Environment.NewLine}{appContextType?.FullName}", - (_) => { + (_) => + { IEnumerable matchingFilters = _featureFilters.Where(f => { @@ -413,7 +414,8 @@ private ContextualFeatureFilterEvaluator GetContextualFeatureFilter(string filte ContextualFeatureFilterEvaluator filter = _contextualFeatureFilterCache.GetOrAdd( $"{filterName}{Environment.NewLine}{appContextType.FullName}", - (_) => { + (_) => + { IFeatureFilterMetadata metadata = GetFeatureFilterMetadata(filterName, appContextType); diff --git a/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs b/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs index bd572e71..fe889893 100644 --- a/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs +++ b/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs @@ -18,4 +18,4 @@ public interface IFilterParametersBinder /// A settings object that is understood by the implementer of . object BindParameters(IConfiguration parameters); } -} \ No newline at end of file +} diff --git a/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs b/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs index 50351526..20b576b3 100644 --- a/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs +++ b/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs @@ -24,4 +24,4 @@ internal static class MicrosoftFeatureManagementFields public const string Name = "name"; public const string Parameters = "parameters"; } -} \ No newline at end of file +} diff --git a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs index b0a9bdd6..50a6ba7f 100644 --- a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs +++ b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs @@ -42,21 +42,21 @@ public static IFeatureManagementBuilder AddFeatureManagement(this IServiceCollec // Add required services services.TryAddSingleton(); - services.AddSingleton(sp => + services.AddSingleton(sp => new FeatureManager( sp.GetRequiredService(), sp.GetRequiredService>().Value) - { - FeatureFilters = sp.GetRequiredService>(), - SessionManagers = sp.GetRequiredService>(), - Cache = sp.GetRequiredService(), - Logger = sp.GetRequiredService().CreateLogger() - }); + { + FeatureFilters = sp.GetRequiredService>(), + SessionManagers = sp.GetRequiredService>(), + Cache = sp.GetRequiredService(), + Logger = sp.GetRequiredService().CreateLogger() + }); services.AddScoped(); var builder = new FeatureManagementBuilder(services); - + // // Add built-in feature filters builder.AddFeatureFilter(); @@ -119,16 +119,16 @@ public static IFeatureManagementBuilder AddScopedFeatureManagement(this IService // Add required services services.TryAddSingleton(); - services.AddScoped(sp => + services.AddScoped(sp => new FeatureManager( sp.GetRequiredService(), sp.GetRequiredService>().Value) - { - FeatureFilters = sp.GetRequiredService>(), - SessionManagers = sp.GetRequiredService>(), - Cache = sp.GetRequiredService(), - Logger = sp.GetRequiredService().CreateLogger() - }); + { + FeatureFilters = sp.GetRequiredService>(), + SessionManagers = sp.GetRequiredService>(), + Cache = sp.GetRequiredService(), + Logger = sp.GetRequiredService().CreateLogger() + }); services.AddScoped(); @@ -138,7 +138,7 @@ public static IFeatureManagementBuilder AddScopedFeatureManagement(this IService // Add built-in feature filters builder.AddFeatureFilter(); - builder.AddFeatureFilter(sp => + builder.AddFeatureFilter(sp => new TimeWindowFilter() { Cache = sp.GetRequiredService() diff --git a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs index cc89482f..455f384b 100644 --- a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs +++ b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs @@ -26,7 +26,7 @@ public CustomTargetingFilter(IOptions options, ILogg public Task EvaluateAsync(FeatureFilterEvaluationContext context) { - return _contextualFilter.EvaluateAsync(context, new TargetingContext(){ UserId = "Jeff" }); + return _contextualFilter.EvaluateAsync(context, new TargetingContext() { UserId = "Jeff" }); } } } diff --git a/tests/Tests.FeatureManagement/FeatureManagement.cs b/tests/Tests.FeatureManagement/FeatureManagement.cs index e5c0ba06..9fc446a8 100644 --- a/tests/Tests.FeatureManagement/FeatureManagement.cs +++ b/tests/Tests.FeatureManagement/FeatureManagement.cs @@ -106,7 +106,6 @@ public async Task ReadsTopLevelConfiguration() Assert.True(await featureManager.IsEnabledAsync(feature)); } - [Fact] public void AddsScopedFeatureManagement() { @@ -129,7 +128,7 @@ public void AddsScopedFeatureManagement() Assert.Contains(services, descriptor => descriptor.ServiceType == typeof(IFeatureFilterMetadata) && descriptor.Lifetime == ServiceLifetime.Scoped); Assert.DoesNotContain(services, descriptor => descriptor.ServiceType == typeof(IFeatureFilterMetadata) && descriptor.Lifetime == ServiceLifetime.Singleton); - var ex = Assert.Throws( + FeatureManagementException ex = Assert.Throws( () => { services.AddFeatureManagement(); @@ -175,7 +174,7 @@ public async Task AllowsDuplicatedFilterAlias() var appContext = new AppContext(); var dummyContext = new DummyContext(); - + var targetingContext = new TargetingContext(); Assert.True(await featureManager.IsEnabledAsync(featureName)); @@ -211,7 +210,7 @@ public async Task AllowsDuplicatedFilterAlias() featureManager = serviceProvider.GetRequiredService(); - var ex = await Assert.ThrowsAsync( + FeatureManagementException ex = await Assert.ThrowsAsync( async () => { await featureManager.IsEnabledAsync(featureName); @@ -271,7 +270,7 @@ public async Task CustomFilterContextualTargetingWithNullSetting() IConfiguration config = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); ServiceCollection services = new ServiceCollection(); - + var targetingContextAccessor = new OnDemandTargetingContextAccessor(); services.AddSingleton(targetingContextAccessor); @@ -343,7 +342,7 @@ public async Task TimeWindow() Assert.False(await featureManager.IsEnabledAsync(feature4)); Assert.True(await featureManager.IsEnabledAsync(feature5)); Assert.False(await featureManager.IsEnabledAsync(feature6)); - + for (int i = 0; i < 10; i++) { Assert.True(await featureManager.IsEnabledAsync(Features.RecurringTimeWindowTestFeature)); @@ -625,7 +624,7 @@ public async Task SwallowsExceptionForMissingFeatureFilter() IFeatureManager featureManager = serviceProvider.GetRequiredService(); - var isEnabled = await featureManager.IsEnabledAsync(Features.ConditionalFeature); + bool isEnabled = await featureManager.IsEnabledAsync(Features.ConditionalFeature); Assert.False(isEnabled); } @@ -752,11 +751,11 @@ public async Task ThreadsafeSnapshot() await Task.WhenAll(tasks); - bool result = tasks.First().Result; + bool result = await tasks.First(); foreach (Task t in tasks) { - Assert.Equal(result, t.Result); + Assert.Equal(result, await t); } } @@ -882,7 +881,6 @@ public async Task UsesRequirementType() // Set filters to all return true testFeatureFilter.Callback = _ => Task.FromResult(true); - Assert.True(await featureManager.IsEnabledAsync(anyFilterFeature)); Assert.True(await featureManager.IsEnabledAsync(allFilterFeature)); diff --git a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs index 50c6e449..d55c14f7 100644 --- a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs +++ b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs @@ -1671,7 +1671,7 @@ public async void RecurrenceEvaluationThroughCacheTest() mockedTimeProvider.UtcNow = DateTimeOffset.Parse("2024-2-7T00:00:00+08:00"); Assert.False(await mockedTimeWindowFilter.EvaluateAsync(context)); - for (int i = 0; i < 10; i++ ) + for (int i = 0; i < 10; i++) { mockedTimeProvider.UtcNow = mockedTimeProvider.UtcNow.AddDays(1); Assert.False(await mockedTimeWindowFilter.EvaluateAsync(context)); From c02a9920475256ec422cd84f40b0c67618f0a5a0 Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Wed, 29 May 2024 23:34:39 +0800 Subject: [PATCH 3/6] update editorconfig --- .editorconfig | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2e175471..b6ae3d7d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -61,9 +61,6 @@ csharp_space_between_square_brackets = false dotnet_sort_system_directives_first = true dotnet_separate_import_directive_groups = false -# Remove unnecessary import -dotnet_diagnostic.IDE0005.severity = warning - # License header dotnet_diagnostic.IDE0073.severity = warning file_header_template = Copyright (c) Microsoft Corporation. All Rights Reserved.\nLicensed under the MIT license. @@ -178,13 +175,13 @@ dotnet_naming_symbols.private_fields.applicable_accessibilities = private, prote dotnet_naming_style.camelcase.capitalization = camel_case -dotnet_naming_rule.parameters_should_be_camelcase.severity = warning +dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase dotnet_naming_symbols.parameters.applicable_kinds = parameter dotnet_naming_symbols.parameters.applicable_accessibilities = * -dotnet_naming_rule.local_variables_should_be_camelcase.severity = warning +dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase dotnet_naming_symbols.local_variables.applicable_kinds = local From 4d26e2fbea74bce91a0a8adfb51781d24b430a8d Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Wed, 29 May 2024 23:36:17 +0800 Subject: [PATCH 4/6] style format --- examples/BlazorServerApp/BrowserFilter.cs | 5 ++- .../BlazorServerApp/BrowserFilterSettings.cs | 5 ++- .../BlazorServerApp/Data/WeatherForecast.cs | 3 ++ .../Data/WeatherForecastService.cs | 3 ++ .../MyTargetingContextAccessor.cs | 5 ++- .../BlazorServerApp/Pages/Error.cshtml.cs | 7 ++- examples/BlazorServerApp/Program.cs | 7 ++- examples/BlazorServerApp/UserAgentContext.cs | 5 ++- examples/ConsoleApp/AccountServiceContext.cs | 4 +- .../FeatureFilters/AccountIdFilter.cs | 4 +- .../FeatureFilters/IAccountContext.cs | 4 +- examples/ConsoleApp/Program.cs | 7 ++- .../QueryStringAuthenticationExtensions.cs | 4 +- .../QueryStringAuthenticationHandler.cs | 12 ++--- .../QueryStringAuthenticationOptions.cs | 4 +- .../FeatureFlagDemo/Authentication/Schemes.cs | 4 +- examples/FeatureFlagDemo/BrowserFilter.cs | 10 ++--- .../FeatureFlagDemo/BrowserFilterSettings.cs | 4 +- examples/FeatureFlagDemo/ClaimTypes.cs | 4 +- .../Controllers/BetaController.cs | 4 +- .../Controllers/HomeController.cs | 8 ++-- .../FeatureNotEnabledDisabledHandler.cs | 4 +- .../HttpContextTargetingContextAccessor.cs | 8 ++-- .../FeatureFlagDemo/Models/ErrorViewModel.cs | 4 +- examples/FeatureFlagDemo/MyFeatureFlags.cs | 4 +- examples/FeatureFlagDemo/Program.cs | 6 +-- examples/FeatureFlagDemo/Startup.cs | 4 +- examples/FeatureFlagDemo/SuperUserFilter.cs | 6 +-- .../FeatureFlagDemo/ThirdPartyActionFilter.cs | 6 +-- .../FeatureFlagDemo/ThirdPartyMiddleware.cs | 6 +-- .../Views/Shared/Error.cshtml.cs | 5 ++- examples/RazorPages/Pages/Error.cshtml.cs | 5 ++- examples/RazorPages/Pages/Index.cshtml.cs | 5 ++- examples/RazorPages/Pages/Privacy.cshtml.cs | 5 ++- examples/RazorPages/Program.cs | 7 ++- .../Identity/IUserRepository.cs | 4 +- .../Identity/InMemoryUserRepository.cs | 4 +- examples/TargetingConsoleApp/Identity/User.cs | 4 +- examples/TargetingConsoleApp/Program.cs | 5 ++- ...tCoreFeatureManagementBuilderExtensions.cs | 28 ++++++++++-- .../DisabledFeatureFilter.cs | 4 +- .../Extensions/EnumerableExtensions.cs | 4 +- .../FeatureGateAttribute.cs | 44 ++++++++++++++----- .../FeatureGatedAsyncActionFilter.cs | 26 +++++++++-- .../FilterCollectionExtensions.cs | 4 +- .../IDisabledFeatureHandler.cs | 24 +++++++++- .../InlineDisabledFeatureHandler.cs | 24 +++++++++- .../NotFoundDisabledFeatureHandler.cs | 26 +++++++++-- .../TagHelpers/FeatureTagHelper.cs | 30 ++++++++++--- .../UseForFeatureExtensions.cs | 24 +++++++++- .../AssemblyInfo.cs | 4 +- .../ConfigurationFeatureDefinitionProvider.cs | 24 +++++++--- .../ConfigurationFields.cs | 3 +- .../ConfigurationWrapper.cs | 16 +++---- .../ContextualFeatureFilterEvaluator.cs | 8 ++-- .../FeatureDefinition.cs | 4 +- .../FeatureFilterConfiguration.cs | 14 +++++- .../FeatureFilterEvaluationContext.cs | 4 +- .../FeatureFilters/ISystemClock.cs | 3 +- .../FeatureFilters/PercentageFilter.cs | 16 +++++-- .../PercentageFilterSettings.cs | 4 +- .../FeatureFilters/Recurrence/Recurrence.cs | 4 +- .../Recurrence/RecurrenceEvaluator.cs | 5 +-- .../Recurrence/RecurrencePattern.cs | 4 +- .../Recurrence/RecurrencePatternType.cs | 4 +- .../Recurrence/RecurrenceRange.cs | 4 +- .../Recurrence/RecurrenceRangeType.cs | 4 +- .../Recurrence/RecurrenceValidator.cs | 4 +- .../FeatureFilters/TimeWindowFilter.cs | 18 ++++++-- .../TimeWindowFilterSettings.cs | 4 +- .../FeatureManagementBuilder.cs | 4 +- .../FeatureManagementBuilderExtensions.cs | 14 +++++- .../FeatureManagementError.cs | 4 +- .../FeatureManagementException.cs | 4 +- .../FeatureManagementOptions.cs | 4 +- .../FeatureManager.cs | 18 ++++++-- .../FeatureManagerSnapshot.cs | 4 +- .../FilterAliasAttribute.cs | 4 +- .../IContextualFeatureFilter.cs | 4 +- .../IFeatureDefinitionProvider.cs | 4 +- .../IFeatureDefinitionProviderCacheable.cs | 3 +- .../IFeatureFilter.cs | 4 +- .../IFeatureFilterMetadata.cs | 4 +- .../IFeatureManagementBuilder.cs | 4 +- .../IFeatureManager.cs | 4 +- .../IFeatureManagerSnapshot.cs | 4 +- .../IFilterParametersBinder.cs | 4 +- .../ISessionManager.cs | 4 +- .../IsExternalInit.cs | 3 +- .../MicrosoftFeatureManagementFields.cs | 3 +- .../RequirementType.cs | 4 +- .../ServiceCollectionExtensions.cs | 18 ++++++-- .../Targeting/Audience.cs | 4 +- .../Targeting/BasicAudience.cs | 4 +- .../Targeting/ContextualTargetingFilter.cs | 19 +++++--- .../Targeting/GroupRollout.cs | 4 +- .../Targeting/ITargetingContext.cs | 4 +- .../Targeting/ITargetingContextAccessor.cs | 4 +- .../Targeting/TargetingContext.cs | 4 +- .../Targeting/TargetingEvaluationOptions.cs | 4 +- .../Targeting/TargetingFilter.cs | 16 +++++-- .../Targeting/TargetingFilterSettings.cs | 4 +- .../Utils/RandomGenerator.cs | 8 ++-- .../FeatureManagementAspNetCore.cs | 32 +++++++++++--- .../Features.cs | 4 +- .../MvcFilter.cs | 4 +- .../Pages/RazorTestAll.cshtml.cs | 4 +- .../Pages/RazorTestAny.cshtml.cs | 4 +- .../TestController.cs | 4 +- .../TestFilter.cs | 26 +++++++++-- tests/Tests.FeatureManagement/AppContext.cs | 4 +- .../ContextualTestFilter.cs | 34 +++++++++++++- .../CustomTargetingFilter.cs | 36 +++++++++++++-- .../FeatureManagement.cs | 38 ++++++++++++++-- tests/Tests.FeatureManagement/Features.cs | 4 +- .../FiltersWithDuplicatedAlias.cs | 34 +++++++++++++- .../IAccountContext.cs | 4 +- .../InMemoryFeatureDefinitionProvider.cs | 37 +++++++++++++++- .../InvalidFeatureFilter.cs | 34 +++++++++++++- .../MicrosoftFeatureManagementSchema.cs | 38 ++++++++++++++-- .../Tests.FeatureManagement/OnDemandClock.cs | 35 ++++++++++++++- .../OnDemandTargetingContextAccessor.cs | 34 +++++++++++++- .../RecurrenceEvaluation.cs | 38 ++++++++++++++-- tests/Tests.FeatureManagement/TestFilter.cs | 36 +++++++++++++-- 124 files changed, 970 insertions(+), 306 deletions(-) diff --git a/examples/BlazorServerApp/BrowserFilter.cs b/examples/BlazorServerApp/BrowserFilter.cs index 376f323e..ba2555c8 100644 --- a/examples/BlazorServerApp/BrowserFilter.cs +++ b/examples/BlazorServerApp/BrowserFilter.cs @@ -1,4 +1,7 @@ -using Microsoft.FeatureManagement; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement; namespace BlazorServerApp { diff --git a/examples/BlazorServerApp/BrowserFilterSettings.cs b/examples/BlazorServerApp/BrowserFilterSettings.cs index 277f7df3..372ba5d3 100644 --- a/examples/BlazorServerApp/BrowserFilterSettings.cs +++ b/examples/BlazorServerApp/BrowserFilterSettings.cs @@ -1,4 +1,7 @@ -namespace BlazorServerApp +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +namespace BlazorServerApp { public class BrowserFilterSettings { diff --git a/examples/BlazorServerApp/Data/WeatherForecast.cs b/examples/BlazorServerApp/Data/WeatherForecast.cs index a0227a94..02209e18 100644 --- a/examples/BlazorServerApp/Data/WeatherForecast.cs +++ b/examples/BlazorServerApp/Data/WeatherForecast.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + namespace BlazorServerApp.Data { public class WeatherForecast diff --git a/examples/BlazorServerApp/Data/WeatherForecastService.cs b/examples/BlazorServerApp/Data/WeatherForecastService.cs index 29a6c8c1..b3f53c43 100644 --- a/examples/BlazorServerApp/Data/WeatherForecastService.cs +++ b/examples/BlazorServerApp/Data/WeatherForecastService.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + namespace BlazorServerApp.Data { public class WeatherForecastService diff --git a/examples/BlazorServerApp/MyTargetingContextAccessor.cs b/examples/BlazorServerApp/MyTargetingContextAccessor.cs index 13d9b1a6..bca2257c 100644 --- a/examples/BlazorServerApp/MyTargetingContextAccessor.cs +++ b/examples/BlazorServerApp/MyTargetingContextAccessor.cs @@ -1,4 +1,7 @@ -using Microsoft.AspNetCore.Components.Authorization; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.AspNetCore.Components.Authorization; using Microsoft.FeatureManagement.FeatureFilters; namespace BlazorServerApp diff --git a/examples/BlazorServerApp/Pages/Error.cshtml.cs b/examples/BlazorServerApp/Pages/Error.cshtml.cs index b6d7624e..631b5ec7 100644 --- a/examples/BlazorServerApp/Pages/Error.cshtml.cs +++ b/examples/BlazorServerApp/Pages/Error.cshtml.cs @@ -1,6 +1,9 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; namespace BlazorServerApp.Pages { diff --git a/examples/BlazorServerApp/Program.cs b/examples/BlazorServerApp/Program.cs index 1dfd1c43..afba470d 100644 --- a/examples/BlazorServerApp/Program.cs +++ b/examples/BlazorServerApp/Program.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using BlazorServerApp.Data; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.FeatureManagement; @@ -8,7 +11,7 @@ public class Program { public static void Main(string[] args) { - var builder = WebApplication.CreateBuilder(args); + WebApplicationBuilder builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); @@ -26,7 +29,7 @@ public static void Main(string[] args) .WithTargeting() .AddFeatureFilter(); - var app = builder.Build(); + WebApplication app = builder.Build(); if (!app.Environment.IsDevelopment()) { diff --git a/examples/BlazorServerApp/UserAgentContext.cs b/examples/BlazorServerApp/UserAgentContext.cs index 47a63bd8..fef5e946 100644 --- a/examples/BlazorServerApp/UserAgentContext.cs +++ b/examples/BlazorServerApp/UserAgentContext.cs @@ -1,4 +1,7 @@ -namespace BlazorServerApp +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +namespace BlazorServerApp { public class UserAgentContext { diff --git a/examples/ConsoleApp/AccountServiceContext.cs b/examples/ConsoleApp/AccountServiceContext.cs index 95f85a33..2cd1d90f 100644 --- a/examples/ConsoleApp/AccountServiceContext.cs +++ b/examples/ConsoleApp/AccountServiceContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + class AccountServiceContext : IAccountContext { public string AccountId { get; set; } diff --git a/examples/ConsoleApp/FeatureFilters/AccountIdFilter.cs b/examples/ConsoleApp/FeatureFilters/AccountIdFilter.cs index d91b820a..ffb3d289 100644 --- a/examples/ConsoleApp/FeatureFilters/AccountIdFilter.cs +++ b/examples/ConsoleApp/FeatureFilters/AccountIdFilter.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.Extensions.Configuration; using Microsoft.FeatureManagement; diff --git a/examples/ConsoleApp/FeatureFilters/IAccountContext.cs b/examples/ConsoleApp/FeatureFilters/IAccountContext.cs index f65c77d0..cbd48032 100644 --- a/examples/ConsoleApp/FeatureFilters/IAccountContext.cs +++ b/examples/ConsoleApp/FeatureFilters/IAccountContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + public interface IAccountContext { string AccountId { get; } diff --git a/examples/ConsoleApp/Program.cs b/examples/ConsoleApp/Program.cs index 93152719..527b6049 100644 --- a/examples/ConsoleApp/Program.cs +++ b/examples/ConsoleApp/Program.cs @@ -1,4 +1,7 @@ -using Microsoft.Extensions.Configuration; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.FeatureManagement; @@ -31,7 +34,7 @@ // // Mimic work items in a task-driven console application - foreach (var account in accounts) + foreach (string account in accounts) { const string FeatureName = "Beta"; diff --git a/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationExtensions.cs b/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationExtensions.cs index e198eb38..4a4fcce5 100644 --- a/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationExtensions.cs +++ b/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationExtensions.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Authentication; namespace FeatureFlagDemo.Authentication diff --git a/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationHandler.cs b/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationHandler.cs index 073b7452..2b01eaf9 100644 --- a/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationHandler.cs +++ b/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationHandler.cs @@ -1,15 +1,15 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// -using Microsoft.AspNetCore.Authentication; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Microsoft.Extensions.Primitives; + using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; +using Microsoft.AspNetCore.Authentication; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Microsoft.Extensions.Primitives; namespace FeatureFlagDemo.Authentication { diff --git a/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationOptions.cs b/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationOptions.cs index 503f6bcd..b5f335e8 100644 --- a/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationOptions.cs +++ b/examples/FeatureFlagDemo/Authentication/QueryStringAuthenticationOptions.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Authentication; namespace FeatureFlagDemo.Authentication diff --git a/examples/FeatureFlagDemo/Authentication/Schemes.cs b/examples/FeatureFlagDemo/Authentication/Schemes.cs index cb262643..1aefec8b 100644 --- a/examples/FeatureFlagDemo/Authentication/Schemes.cs +++ b/examples/FeatureFlagDemo/Authentication/Schemes.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace FeatureFlagDemo.Authentication { public class Schemes diff --git a/examples/FeatureFlagDemo/BrowserFilter.cs b/examples/FeatureFlagDemo/BrowserFilter.cs index efeb8e70..8076c590 100644 --- a/examples/FeatureFlagDemo/BrowserFilter.cs +++ b/examples/FeatureFlagDemo/BrowserFilter.cs @@ -1,12 +1,12 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Configuration; -using Microsoft.FeatureManagement; + using System; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Configuration; +using Microsoft.FeatureManagement; namespace FeatureFlagDemo.FeatureManagement.FeatureFilters { diff --git a/examples/FeatureFlagDemo/BrowserFilterSettings.cs b/examples/FeatureFlagDemo/BrowserFilterSettings.cs index 91b8211a..dc8b634c 100644 --- a/examples/FeatureFlagDemo/BrowserFilterSettings.cs +++ b/examples/FeatureFlagDemo/BrowserFilterSettings.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace FeatureFlagDemo.FeatureManagement.FeatureFilters diff --git a/examples/FeatureFlagDemo/ClaimTypes.cs b/examples/FeatureFlagDemo/ClaimTypes.cs index b24dfd20..57f8b33f 100644 --- a/examples/FeatureFlagDemo/ClaimTypes.cs +++ b/examples/FeatureFlagDemo/ClaimTypes.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace FeatureFlagDemo { static class ClaimTypes diff --git a/examples/FeatureFlagDemo/Controllers/BetaController.cs b/examples/FeatureFlagDemo/Controllers/BetaController.cs index 4fed13f8..4e46ef3d 100644 --- a/examples/FeatureFlagDemo/Controllers/BetaController.cs +++ b/examples/FeatureFlagDemo/Controllers/BetaController.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc; using Microsoft.FeatureManagement; using Microsoft.FeatureManagement.Mvc; diff --git a/examples/FeatureFlagDemo/Controllers/HomeController.cs b/examples/FeatureFlagDemo/Controllers/HomeController.cs index 6e43fba2..c6cdcaa7 100644 --- a/examples/FeatureFlagDemo/Controllers/HomeController.cs +++ b/examples/FeatureFlagDemo/Controllers/HomeController.cs @@ -1,13 +1,13 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Diagnostics; -using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; using FeatureFlagDemo.Models; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.FeatureManagement; using Microsoft.FeatureManagement.Mvc; -using System.Threading.Tasks; namespace FeatureFlagDemo.Controllers { diff --git a/examples/FeatureFlagDemo/FeatureNotEnabledDisabledHandler.cs b/examples/FeatureFlagDemo/FeatureNotEnabledDisabledHandler.cs index 64836ea4..a3afecca 100644 --- a/examples/FeatureFlagDemo/FeatureNotEnabledDisabledHandler.cs +++ b/examples/FeatureFlagDemo/FeatureNotEnabledDisabledHandler.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.ModelBinding; diff --git a/examples/FeatureFlagDemo/HttpContextTargetingContextAccessor.cs b/examples/FeatureFlagDemo/HttpContextTargetingContextAccessor.cs index 9f9c8964..df114e62 100644 --- a/examples/FeatureFlagDemo/HttpContextTargetingContextAccessor.cs +++ b/examples/FeatureFlagDemo/HttpContextTargetingContextAccessor.cs @@ -1,12 +1,12 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// -using Microsoft.AspNetCore.Http; -using Microsoft.FeatureManagement.FeatureFilters; + using System; using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.FeatureManagement.FeatureFilters; namespace FeatureFlagDemo { diff --git a/examples/FeatureFlagDemo/Models/ErrorViewModel.cs b/examples/FeatureFlagDemo/Models/ErrorViewModel.cs index 3a9076f6..898d6199 100644 --- a/examples/FeatureFlagDemo/Models/ErrorViewModel.cs +++ b/examples/FeatureFlagDemo/Models/ErrorViewModel.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; namespace FeatureFlagDemo.Models diff --git a/examples/FeatureFlagDemo/MyFeatureFlags.cs b/examples/FeatureFlagDemo/MyFeatureFlags.cs index 0590a980..ae72f72f 100644 --- a/examples/FeatureFlagDemo/MyFeatureFlags.cs +++ b/examples/FeatureFlagDemo/MyFeatureFlags.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace FeatureFlagDemo { // diff --git a/examples/FeatureFlagDemo/Program.cs b/examples/FeatureFlagDemo/Program.cs index 43be14d4..dc19b4ea 100644 --- a/examples/FeatureFlagDemo/Program.cs +++ b/examples/FeatureFlagDemo/Program.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore; using Microsoft.Extensions.Configuration.AzureAppConfiguration; @@ -18,7 +18,7 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args) return WebHost.CreateDefaultBuilder(args) .ConfigureAppConfiguration((ctx, builder) => { - var settings = builder.Build(); + IConfigurationRoot settings = builder.Build(); if (!string.IsNullOrEmpty(settings["AppConfiguration:ConnectionString"])) { diff --git a/examples/FeatureFlagDemo/Startup.cs b/examples/FeatureFlagDemo/Startup.cs index 4c5722bd..327f964f 100644 --- a/examples/FeatureFlagDemo/Startup.cs +++ b/examples/FeatureFlagDemo/Startup.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using FeatureFlagDemo.Authentication; using FeatureFlagDemo.FeatureManagement; using FeatureFlagDemo.FeatureManagement.FeatureFilters; diff --git a/examples/FeatureFlagDemo/SuperUserFilter.cs b/examples/FeatureFlagDemo/SuperUserFilter.cs index 25dc8e5f..8719d921 100644 --- a/examples/FeatureFlagDemo/SuperUserFilter.cs +++ b/examples/FeatureFlagDemo/SuperUserFilter.cs @@ -1,8 +1,8 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// -using Microsoft.FeatureManagement; + using System.Threading.Tasks; +using Microsoft.FeatureManagement; namespace FeatureFlagDemo.FeatureManagement.FeatureFilters { diff --git a/examples/FeatureFlagDemo/ThirdPartyActionFilter.cs b/examples/FeatureFlagDemo/ThirdPartyActionFilter.cs index a2d3abd1..edeaa8d7 100644 --- a/examples/FeatureFlagDemo/ThirdPartyActionFilter.cs +++ b/examples/FeatureFlagDemo/ThirdPartyActionFilter.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; @@ -9,7 +9,7 @@ namespace FeatureFlagDemo { public class ThirdPartyActionFilter : IAsyncActionFilter { - private ILogger _logger; + private readonly ILogger _logger; public ThirdPartyActionFilter(ILoggerFactory loggerFactory) { diff --git a/examples/FeatureFlagDemo/ThirdPartyMiddleware.cs b/examples/FeatureFlagDemo/ThirdPartyMiddleware.cs index 74907908..13286c71 100644 --- a/examples/FeatureFlagDemo/ThirdPartyMiddleware.cs +++ b/examples/FeatureFlagDemo/ThirdPartyMiddleware.cs @@ -1,9 +1,9 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + +using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using System.Threading.Tasks; namespace FeatureFlagDemo { diff --git a/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs b/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs index b8df250f..d9fa968a 100644 --- a/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs +++ b/examples/FeatureFlagDemo/Views/Shared/Error.cshtml.cs @@ -1,6 +1,9 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -using System.Diagnostics; namespace FeatureFlagDemo.Pages.Shared { diff --git a/examples/RazorPages/Pages/Error.cshtml.cs b/examples/RazorPages/Pages/Error.cshtml.cs index 149f1f23..2d83868c 100644 --- a/examples/RazorPages/Pages/Error.cshtml.cs +++ b/examples/RazorPages/Pages/Error.cshtml.cs @@ -1,6 +1,9 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -using System.Diagnostics; namespace RazorPages.Pages { diff --git a/examples/RazorPages/Pages/Index.cshtml.cs b/examples/RazorPages/Pages/Index.cshtml.cs index 55bed039..6de96481 100644 --- a/examples/RazorPages/Pages/Index.cshtml.cs +++ b/examples/RazorPages/Pages/Index.cshtml.cs @@ -1,4 +1,7 @@ -using Microsoft.AspNetCore.Mvc.RazorPages; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.FeatureManagement.Mvc; namespace RazorPages.Pages diff --git a/examples/RazorPages/Pages/Privacy.cshtml.cs b/examples/RazorPages/Pages/Privacy.cshtml.cs index 2e8f5214..8340b449 100644 --- a/examples/RazorPages/Pages/Privacy.cshtml.cs +++ b/examples/RazorPages/Pages/Privacy.cshtml.cs @@ -1,4 +1,7 @@ -using Microsoft.AspNetCore.Mvc; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace RazorPages.Pages diff --git a/examples/RazorPages/Program.cs b/examples/RazorPages/Program.cs index 624312eb..594ff161 100644 --- a/examples/RazorPages/Program.cs +++ b/examples/RazorPages/Program.cs @@ -1,12 +1,15 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using Microsoft.FeatureManagement; -var builder = WebApplication.CreateBuilder(args); +WebApplicationBuilder builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorPages(); builder.Services.AddFeatureManagement(); -var app = builder.Build(); +WebApplication app = builder.Build(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) diff --git a/examples/TargetingConsoleApp/Identity/IUserRepository.cs b/examples/TargetingConsoleApp/Identity/IUserRepository.cs index 15fedc84..30176f1d 100644 --- a/examples/TargetingConsoleApp/Identity/IUserRepository.cs +++ b/examples/TargetingConsoleApp/Identity/IUserRepository.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; namespace TargetingConsoleApp.Identity diff --git a/examples/TargetingConsoleApp/Identity/InMemoryUserRepository.cs b/examples/TargetingConsoleApp/Identity/InMemoryUserRepository.cs index 450c7044..79ed67cf 100644 --- a/examples/TargetingConsoleApp/Identity/InMemoryUserRepository.cs +++ b/examples/TargetingConsoleApp/Identity/InMemoryUserRepository.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/examples/TargetingConsoleApp/Identity/User.cs b/examples/TargetingConsoleApp/Identity/User.cs index be27cac1..7f2c4716 100644 --- a/examples/TargetingConsoleApp/Identity/User.cs +++ b/examples/TargetingConsoleApp/Identity/User.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace TargetingConsoleApp.Identity diff --git a/examples/TargetingConsoleApp/Program.cs b/examples/TargetingConsoleApp/Program.cs index d8ee6359..1c091c3a 100644 --- a/examples/TargetingConsoleApp/Program.cs +++ b/examples/TargetingConsoleApp/Program.cs @@ -1,4 +1,7 @@ -using Microsoft.Extensions.Configuration; +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.FeatureManagement; using Microsoft.FeatureManagement.FeatureFilters; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs index 742b942e..724b0319 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs @@ -1,11 +1,31 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.DependencyInjection; using Microsoft.FeatureManagement.Mvc; -using System; -using System.Collections.Generic; namespace Microsoft.FeatureManagement { @@ -22,7 +42,7 @@ public static class AspNetCoreFeatureManagementBuilderExtensions /// The feature management builder. public static IFeatureManagementBuilder UseDisabledFeaturesHandler(this IFeatureManagementBuilder builder, IDisabledFeaturesHandler disabledFeaturesHandler) { - builder.Services.AddSingleton(disabledFeaturesHandler ?? throw new ArgumentNullException(nameof(disabledFeaturesHandler))); + builder.Services.AddSingleton(disabledFeaturesHandler ?? throw new ArgumentNullException(nameof(disabledFeaturesHandler))); return builder; } diff --git a/src/Microsoft.FeatureManagement.AspNetCore/DisabledFeatureFilter.cs b/src/Microsoft.FeatureManagement.AspNetCore/DisabledFeatureFilter.cs index 3b814606..3e357c60 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/DisabledFeatureFilter.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/DisabledFeatureFilter.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc.Filters; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement.AspNetCore/Extensions/EnumerableExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/Extensions/EnumerableExtensions.cs index fdda6f50..bcf40bfd 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/Extensions/EnumerableExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/Extensions/EnumerableExtensions.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; namespace System.Collections.Generic diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs index fb15e5b1..cff7ae33 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs @@ -1,13 +1,33 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; namespace Microsoft.FeatureManagement.Mvc { @@ -68,7 +88,7 @@ public FeatureGateAttribute(RequirementType requirementType, params object[] fea foreach (object feature in features) { - var type = feature.GetType(); + Type type = feature.GetType(); if (!type.IsEnum) { @@ -90,7 +110,7 @@ public FeatureGateAttribute(RequirementType requirementType, params object[] fea public IEnumerable Features { get; } /// - /// Controls whether any or all features in should be enabled to pass. + /// Controls whether any or all features in should be enabled to pass. /// public RequirementType RequirementType { get; } @@ -106,9 +126,9 @@ public override async Task OnActionExecutionAsync(ActionExecutingContext context // // Enabled state is determined by either 'any' or 'all' features being enabled. - bool enabled = RequirementType == RequirementType.All ? - await Features.All(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)) : - await Features.Any(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)); + bool enabled = RequirementType == RequirementType.All + ? await Features.All(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)) + : await Features.Any(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)); if (enabled) { @@ -134,9 +154,9 @@ public async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext contex // // Enabled state is determined by either 'any' or 'all' features being enabled. - bool enabled = RequirementType == RequirementType.All ? - await Features.All(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)) : - await Features.Any(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)); + bool enabled = RequirementType == RequirementType.All + ? await Features.All(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)) + : await Features.Any(async feature => await fm.IsEnabledAsync(feature).ConfigureAwait(false)); if (enabled) { diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs index 073f953f..b1adf471 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs @@ -1,10 +1,30 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FilterCollectionExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/FilterCollectionExtensions.cs index cfd46554..5778e529 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FilterCollectionExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FilterCollectionExtensions.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc.Filters; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs index 1a19c0d5..6a313273 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs @@ -1,9 +1,29 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.AspNetCore.Mvc.Filters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Filters; namespace Microsoft.FeatureManagement.Mvc { diff --git a/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs index 458b859e..25367d87 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs @@ -1,10 +1,30 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.AspNetCore.Mvc.Filters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Filters; namespace Microsoft.FeatureManagement.Mvc { diff --git a/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs index 9beebc01..d9b20d27 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs @@ -1,11 +1,31 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System.Collections.Generic; +using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; -using System.Collections.Generic; -using System.Threading.Tasks; namespace Microsoft.FeatureManagement.Mvc { diff --git a/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs b/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs index 4a0da1e0..b43ed793 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs @@ -1,10 +1,30 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.AspNetCore.Razor.TagHelpers; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Razor.TagHelpers; namespace Microsoft.FeatureManagement.Mvc.TagHelpers { @@ -54,9 +74,9 @@ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutpu { IEnumerable names = Name.Split(',').Select(n => n.Trim()); - enabled = Requirement == RequirementType.All ? - await names.All(async n => await _featureManager.IsEnabledAsync(n).ConfigureAwait(false)) : - await names.Any(async n => await _featureManager.IsEnabledAsync(n).ConfigureAwait(false)); + enabled = Requirement == RequirementType.All + ? await names.All(async n => await _featureManager.IsEnabledAsync(n).ConfigureAwait(false)) + : await names.Any(async n => await _featureManager.IsEnabledAsync(n).ConfigureAwait(false)); } if (Negate) diff --git a/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs index 4774ee9b..7c6af42b 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs @@ -1,10 +1,30 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -using System; namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/AssemblyInfo.cs b/src/Microsoft.FeatureManagement/AssemblyInfo.cs index 75bfb2fa..e4d9d3da 100644 --- a/src/Microsoft.FeatureManagement/AssemblyInfo.cs +++ b/src/Microsoft.FeatureManagement/AssemblyInfo.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Runtime.CompilerServices; // Tests diff --git a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs index eeea028a..2e628378 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs @@ -1,15 +1,25 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Primitives; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Primitives; namespace Microsoft.FeatureManagement { @@ -381,9 +391,9 @@ private IEnumerable GetFeatureDefinitionSections() .FirstOrDefault(section => string.Equals( section.Key, - _microsoftFeatureManagementSchemaEnabled ? - MicrosoftFeatureManagementFields.FeatureManagementSectionName : - ConfigurationFields.FeatureManagementSectionName, + _microsoftFeatureManagementSchemaEnabled + ? MicrosoftFeatureManagementFields.FeatureManagementSectionName + : ConfigurationFields.FeatureManagementSectionName, StringComparison.OrdinalIgnoreCase)); if (featureManagementConfigurationSection == null) diff --git a/src/Microsoft.FeatureManagement/ConfigurationFields.cs b/src/Microsoft.FeatureManagement/ConfigurationFields.cs index 8b6ba82c..cace2c90 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationFields.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationFields.cs @@ -1,6 +1,5 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs b/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs index a7bd61bf..3911dd48 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationWrapper.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Generic; using Microsoft.Extensions.Configuration; @@ -27,13 +27,13 @@ public string this[string key] set => _configuration[key] = value; } - public IEnumerable GetChildren() => - _configuration.GetChildren(); + public IEnumerable GetChildren() + => _configuration.GetChildren(); - public IChangeToken GetReloadToken() => - _configuration.GetReloadToken(); + public IChangeToken GetReloadToken() + => _configuration.GetReloadToken(); - public IConfigurationSection GetSection(string key) => - _configuration.GetSection(key); + public IConfigurationSection GetSection(string key) + => _configuration.GetSection(key); } } diff --git a/src/Microsoft.FeatureManagement/ContextualFeatureFilterEvaluator.cs b/src/Microsoft.FeatureManagement/ContextualFeatureFilterEvaluator.cs index baf9220a..5c2a824f 100644 --- a/src/Microsoft.FeatureManagement/ContextualFeatureFilterEvaluator.cs +++ b/src/Microsoft.FeatureManagement/ContextualFeatureFilterEvaluator.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Generic; using System.Linq; @@ -14,8 +14,8 @@ namespace Microsoft.FeatureManagement /// class ContextualFeatureFilterEvaluator : IContextualFeatureFilter { - private IFeatureFilterMetadata _filter; - private Func> _evaluateFunc; + private readonly IFeatureFilterMetadata _filter; + private readonly Func> _evaluateFunc; public ContextualFeatureFilterEvaluator(IFeatureFilterMetadata filter, Type appContextType) { diff --git a/src/Microsoft.FeatureManagement/FeatureDefinition.cs b/src/Microsoft.FeatureManagement/FeatureDefinition.cs index 6736314f..52cbae49 100644 --- a/src/Microsoft.FeatureManagement/FeatureDefinition.cs +++ b/src/Microsoft.FeatureManagement/FeatureDefinition.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs b/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs index a9a5f670..cfdb0734 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs @@ -1,8 +1,18 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Collections.Generic; +using Microsoft.Extensions.Configuration; namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/FeatureFilterEvaluationContext.cs b/src/Microsoft.FeatureManagement/FeatureFilterEvaluationContext.cs index 2591e667..61814948 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilterEvaluationContext.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilterEvaluationContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.Extensions.Configuration; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs b/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs index 1fc9b667..2b3995ca 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/ISystemClock.cs @@ -1,6 +1,5 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// using System; diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs index c986e6d9..96c0523b 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs @@ -1,11 +1,21 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.FeatureManagement.Utils; -using System; -using System.Threading.Tasks; namespace Microsoft.FeatureManagement.FeatureFilters { diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilterSettings.cs b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilterSettings.cs index 81124e28..ab38b873 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilterSettings.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilterSettings.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/Recurrence.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/Recurrence.cs index 7a63b6bb..a03d5a12 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/Recurrence.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/Recurrence.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceEvaluator.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceEvaluator.cs index 4dba080a..ce45bc84 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceEvaluator.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceEvaluator.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Generic; using System.Diagnostics; @@ -339,7 +339,6 @@ private static int CalculateWeeklyDayOffset(DayOfWeek day1, DayOfWeek day2) return ((int)day1 - (int)day2 + DaysPerWeek) % DaysPerWeek; } - /// /// Sorts a collection of days of week based on their offsets from a specified first day of week. /// A collection of days of week. diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePattern.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePattern.cs index b750a99a..ff2f5578 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePattern.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePattern.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Generic; diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePatternType.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePatternType.cs index 89142f37..9ed9886c 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePatternType.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrencePatternType.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRange.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRange.cs index ba852a0e..cbbb1db7 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRange.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRange.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRangeType.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRangeType.cs index 942aa48b..ed885ddb 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRangeType.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceRangeType.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceValidator.cs b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceValidator.cs index 992bea72..720c90da 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceValidator.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/Recurrence/RecurrenceValidator.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs index 121bb4cf..17d8e1b5 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs @@ -1,11 +1,21 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; -using System; -using System.Threading.Tasks; namespace Microsoft.FeatureManagement.FeatureFilters { @@ -48,7 +58,7 @@ public TimeWindowFilter(ILoggerFactory loggerFactory = null) /// that can later be used in feature evaluation. public object BindParameters(IConfiguration filterParameters) { - var settings = filterParameters.Get() ?? new TimeWindowFilterSettings(); + TimeWindowFilterSettings settings = filterParameters.Get() ?? new TimeWindowFilterSettings(); if (!RecurrenceValidator.TryValidateSettings(settings, out string paramName, out string reason)) { diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilterSettings.cs b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilterSettings.cs index 6a0bb0d4..9a2e99c6 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilterSettings.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilterSettings.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs b/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs index b7b3b29b..63ed0211 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementBuilder.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs b/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs index 3aeed9a5..0b69ab03 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs @@ -1,10 +1,20 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System.Linq; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.FeatureManagement.FeatureFilters; -using System.Linq; namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/FeatureManagementError.cs b/src/Microsoft.FeatureManagement/FeatureManagementError.cs index d67c0b16..2798f108 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementError.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementError.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement { /// diff --git a/src/Microsoft.FeatureManagement/FeatureManagementException.cs b/src/Microsoft.FeatureManagement/FeatureManagementException.cs index f139d9ad..3d22d58b 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementException.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementException.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/FeatureManagementOptions.cs b/src/Microsoft.FeatureManagement/FeatureManagementOptions.cs index 46658786..addbfd03 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementOptions.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementOptions.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement { /// diff --git a/src/Microsoft.FeatureManagement/FeatureManager.cs b/src/Microsoft.FeatureManagement/FeatureManager.cs index bad2a94c..eaf3dbd3 100644 --- a/src/Microsoft.FeatureManagement/FeatureManager.cs +++ b/src/Microsoft.FeatureManagement/FeatureManager.cs @@ -1,14 +1,24 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/FeatureManagerSnapshot.cs b/src/Microsoft.FeatureManagement/FeatureManagerSnapshot.cs index 1c676cbb..f7adf25d 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagerSnapshot.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagerSnapshot.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Microsoft.FeatureManagement/FilterAliasAttribute.cs b/src/Microsoft.FeatureManagement/FilterAliasAttribute.cs index 30f9d997..54da5584 100644 --- a/src/Microsoft.FeatureManagement/FilterAliasAttribute.cs +++ b/src/Microsoft.FeatureManagement/FilterAliasAttribute.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/IContextualFeatureFilter.cs b/src/Microsoft.FeatureManagement/IContextualFeatureFilter.cs index 64586334..73880a2a 100644 --- a/src/Microsoft.FeatureManagement/IContextualFeatureFilter.cs +++ b/src/Microsoft.FeatureManagement/IContextualFeatureFilter.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/IFeatureDefinitionProvider.cs b/src/Microsoft.FeatureManagement/IFeatureDefinitionProvider.cs index bc4895b9..1e20974a 100644 --- a/src/Microsoft.FeatureManagement/IFeatureDefinitionProvider.cs +++ b/src/Microsoft.FeatureManagement/IFeatureDefinitionProvider.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/Microsoft.FeatureManagement/IFeatureDefinitionProviderCacheable.cs b/src/Microsoft.FeatureManagement/IFeatureDefinitionProviderCacheable.cs index 5d54f32a..46bd00f2 100644 --- a/src/Microsoft.FeatureManagement/IFeatureDefinitionProviderCacheable.cs +++ b/src/Microsoft.FeatureManagement/IFeatureDefinitionProviderCacheable.cs @@ -1,6 +1,5 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/IFeatureFilter.cs b/src/Microsoft.FeatureManagement/IFeatureFilter.cs index e6d914df..8663929b 100644 --- a/src/Microsoft.FeatureManagement/IFeatureFilter.cs +++ b/src/Microsoft.FeatureManagement/IFeatureFilter.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/IFeatureFilterMetadata.cs b/src/Microsoft.FeatureManagement/IFeatureFilterMetadata.cs index bfa75a02..1a364315 100644 --- a/src/Microsoft.FeatureManagement/IFeatureFilterMetadata.cs +++ b/src/Microsoft.FeatureManagement/IFeatureFilterMetadata.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement { /// diff --git a/src/Microsoft.FeatureManagement/IFeatureManagementBuilder.cs b/src/Microsoft.FeatureManagement/IFeatureManagementBuilder.cs index 6365c098..fbe93081 100644 --- a/src/Microsoft.FeatureManagement/IFeatureManagementBuilder.cs +++ b/src/Microsoft.FeatureManagement/IFeatureManagementBuilder.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.Extensions.DependencyInjection; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/IFeatureManager.cs b/src/Microsoft.FeatureManagement/IFeatureManager.cs index 1b4ea0cf..0b32a120 100644 --- a/src/Microsoft.FeatureManagement/IFeatureManager.cs +++ b/src/Microsoft.FeatureManagement/IFeatureManager.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/Microsoft.FeatureManagement/IFeatureManagerSnapshot.cs b/src/Microsoft.FeatureManagement/IFeatureManagerSnapshot.cs index 5ffcdd6b..40f4ccf2 100644 --- a/src/Microsoft.FeatureManagement/IFeatureManagerSnapshot.cs +++ b/src/Microsoft.FeatureManagement/IFeatureManagerSnapshot.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement { /// diff --git a/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs b/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs index fe889893..3fb41d11 100644 --- a/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs +++ b/src/Microsoft.FeatureManagement/IFilterParametersBinder.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.Extensions.Configuration; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/ISessionManager.cs b/src/Microsoft.FeatureManagement/ISessionManager.cs index 67189375..26c7e34d 100644 --- a/src/Microsoft.FeatureManagement/ISessionManager.cs +++ b/src/Microsoft.FeatureManagement/ISessionManager.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; namespace Microsoft.FeatureManagement diff --git a/src/Microsoft.FeatureManagement/IsExternalInit.cs b/src/Microsoft.FeatureManagement/IsExternalInit.cs index 2798741c..66d745e9 100644 --- a/src/Microsoft.FeatureManagement/IsExternalInit.cs +++ b/src/Microsoft.FeatureManagement/IsExternalInit.cs @@ -1,6 +1,5 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// // The init accessor for properties is supported in C# 9.0 and later. // This class is used to compile .NET frameworks that don't support C# 9.0 or later while still using the init accessor for a property. diff --git a/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs b/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs index 20b576b3..7037b878 100644 --- a/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs +++ b/src/Microsoft.FeatureManagement/MicrosoftFeatureManagementFields.cs @@ -1,6 +1,5 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/RequirementType.cs b/src/Microsoft.FeatureManagement/RequirementType.cs index d6fd811c..e8e4779c 100644 --- a/src/Microsoft.FeatureManagement/RequirementType.cs +++ b/src/Microsoft.FeatureManagement/RequirementType.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement { /// diff --git a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs index 50a6ba7f..a289e98e 100644 --- a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs +++ b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs @@ -1,6 +1,19 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -8,9 +21,6 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement.FeatureFilters; -using System; -using System.Collections.Generic; -using System.Linq; namespace Microsoft.FeatureManagement { diff --git a/src/Microsoft.FeatureManagement/Targeting/Audience.cs b/src/Microsoft.FeatureManagement/Targeting/Audience.cs index b27f5e8b..a86692e1 100644 --- a/src/Microsoft.FeatureManagement/Targeting/Audience.cs +++ b/src/Microsoft.FeatureManagement/Targeting/Audience.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/Targeting/BasicAudience.cs b/src/Microsoft.FeatureManagement/Targeting/BasicAudience.cs index 26f6023a..1df4263e 100644 --- a/src/Microsoft.FeatureManagement/Targeting/BasicAudience.cs +++ b/src/Microsoft.FeatureManagement/Targeting/BasicAudience.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs b/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs index b4b43bde..760e568f 100644 --- a/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs +++ b/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs @@ -1,14 +1,24 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; namespace Microsoft.FeatureManagement.FeatureFilters { @@ -132,7 +142,6 @@ public Task EvaluateAsync(FeatureFilterEvaluationContext context, ITargeti return Task.FromResult(IsTargeted(defaultContextId, settings.Audience.DefaultRolloutPercentage)); } - /// /// Determines if a given context id should be targeted based off the provided percentage /// diff --git a/src/Microsoft.FeatureManagement/Targeting/GroupRollout.cs b/src/Microsoft.FeatureManagement/Targeting/GroupRollout.cs index d7b595da..834332b4 100644 --- a/src/Microsoft.FeatureManagement/Targeting/GroupRollout.cs +++ b/src/Microsoft.FeatureManagement/Targeting/GroupRollout.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/Targeting/ITargetingContext.cs b/src/Microsoft.FeatureManagement/Targeting/ITargetingContext.cs index 795320a2..8ccb1105 100644 --- a/src/Microsoft.FeatureManagement/Targeting/ITargetingContext.cs +++ b/src/Microsoft.FeatureManagement/Targeting/ITargetingContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/Targeting/ITargetingContextAccessor.cs b/src/Microsoft.FeatureManagement/Targeting/ITargetingContextAccessor.cs index 94c1eebd..615bfe08 100644 --- a/src/Microsoft.FeatureManagement/Targeting/ITargetingContextAccessor.cs +++ b/src/Microsoft.FeatureManagement/Targeting/ITargetingContextAccessor.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/Targeting/TargetingContext.cs b/src/Microsoft.FeatureManagement/Targeting/TargetingContext.cs index eec4ba95..38437b3b 100644 --- a/src/Microsoft.FeatureManagement/Targeting/TargetingContext.cs +++ b/src/Microsoft.FeatureManagement/Targeting/TargetingContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Collections.Generic; namespace Microsoft.FeatureManagement.FeatureFilters diff --git a/src/Microsoft.FeatureManagement/Targeting/TargetingEvaluationOptions.cs b/src/Microsoft.FeatureManagement/Targeting/TargetingEvaluationOptions.cs index 2ac7af84..8b86c509 100644 --- a/src/Microsoft.FeatureManagement/Targeting/TargetingEvaluationOptions.cs +++ b/src/Microsoft.FeatureManagement/Targeting/TargetingEvaluationOptions.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs b/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs index 05e880f3..feb78602 100644 --- a/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs +++ b/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs @@ -1,11 +1,21 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using System; -using System.Threading.Tasks; namespace Microsoft.FeatureManagement.FeatureFilters { diff --git a/src/Microsoft.FeatureManagement/Targeting/TargetingFilterSettings.cs b/src/Microsoft.FeatureManagement/Targeting/TargetingFilterSettings.cs index 1fde45d7..e9ec9351 100644 --- a/src/Microsoft.FeatureManagement/Targeting/TargetingFilterSettings.cs +++ b/src/Microsoft.FeatureManagement/Targeting/TargetingFilterSettings.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Microsoft.FeatureManagement.FeatureFilters { /// diff --git a/src/Microsoft.FeatureManagement/Utils/RandomGenerator.cs b/src/Microsoft.FeatureManagement/Utils/RandomGenerator.cs index 9067a3c7..1299f976 100644 --- a/src/Microsoft.FeatureManagement/Utils/RandomGenerator.cs +++ b/src/Microsoft.FeatureManagement/Utils/RandomGenerator.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System; using System.Threading; @@ -8,9 +8,9 @@ namespace Microsoft.FeatureManagement.Utils { static class RandomGenerator { - private static Random _global = new Random(); + private static readonly Random _global = new Random(); - private static ThreadLocal _rnd = new ThreadLocal(() => + private static readonly ThreadLocal _rnd = new ThreadLocal(() => { int seed; diff --git a/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs b/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs index 3e5d6aa0..8cbf6d33 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs @@ -1,6 +1,32 @@ + +/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net8.0)' +Before: // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -9,12 +35,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.FeatureManagement; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; using Xunit; namespace Tests.FeatureManagement.AspNetCore diff --git a/tests/Tests.FeatureManagement.AspNetCore/Features.cs b/tests/Tests.FeatureManagement.AspNetCore/Features.cs index d3397a05..043cfe49 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/Features.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/Features.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Tests.FeatureManagement.AspNetCore { static class Features diff --git a/tests/Tests.FeatureManagement.AspNetCore/MvcFilter.cs b/tests/Tests.FeatureManagement.AspNetCore/MvcFilter.cs index 0635a289..4f36d40c 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/MvcFilter.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/MvcFilter.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAll.cshtml.cs b/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAll.cshtml.cs index 5867aa30..de6067b1 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAll.cshtml.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAll.cshtml.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.FeatureManagement.Mvc; diff --git a/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAny.cshtml.cs b/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAny.cshtml.cs index 54a96fae..2e3aeefb 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAny.cshtml.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/Pages/RazorTestAny.cshtml.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.FeatureManagement; diff --git a/tests/Tests.FeatureManagement.AspNetCore/TestController.cs b/tests/Tests.FeatureManagement.AspNetCore/TestController.cs index 2f4c8ce5..f4897f1a 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/TestController.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/TestController.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + using Microsoft.AspNetCore.Mvc; using Microsoft.FeatureManagement; using Microsoft.FeatureManagement.Mvc; diff --git a/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs b/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs index fbd49122..9c21efdb 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs @@ -1,10 +1,30 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; -using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.FeatureManagement; namespace Tests.FeatureManagement.AspNetCore { diff --git a/tests/Tests.FeatureManagement/AppContext.cs b/tests/Tests.FeatureManagement/AppContext.cs index 5431ac52..92f4fc91 100644 --- a/tests/Tests.FeatureManagement/AppContext.cs +++ b/tests/Tests.FeatureManagement/AppContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Tests.FeatureManagement { class AppContext : IAccountContext diff --git a/tests/Tests.FeatureManagement/ContextualTestFilter.cs b/tests/Tests.FeatureManagement/ContextualTestFilter.cs index 4bad3010..1778aca8 100644 --- a/tests/Tests.FeatureManagement/ContextualTestFilter.cs +++ b/tests/Tests.FeatureManagement/ContextualTestFilter.cs @@ -1,9 +1,39 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Threading.Tasks; +using Microsoft.FeatureManagement; namespace Tests.FeatureManagement { diff --git a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs index 455f384b..7e2037dc 100644 --- a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs +++ b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs @@ -1,13 +1,43 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using System; +using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement; using Microsoft.FeatureManagement.FeatureFilters; -using System; -using System.Threading.Tasks; namespace Tests.FeatureManagement { diff --git a/tests/Tests.FeatureManagement/FeatureManagement.cs b/tests/Tests.FeatureManagement/FeatureManagement.cs index 9fc446a8..47fef6e9 100644 --- a/tests/Tests.FeatureManagement/FeatureManagement.cs +++ b/tests/Tests.FeatureManagement/FeatureManagement.cs @@ -1,16 +1,46 @@ + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.FeatureManagement; -using Microsoft.FeatureManagement.FeatureFilters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.FeatureManagement; +using Microsoft.FeatureManagement.FeatureFilters; using Xunit; namespace Tests.FeatureManagement diff --git a/tests/Tests.FeatureManagement/Features.cs b/tests/Tests.FeatureManagement/Features.cs index 4fa4fe91..228c0ee0 100644 --- a/tests/Tests.FeatureManagement/Features.cs +++ b/tests/Tests.FeatureManagement/Features.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Tests.FeatureManagement { static class Features diff --git a/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs b/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs index c1e5f9b4..7ff7fa08 100644 --- a/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs +++ b/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs @@ -1,8 +1,38 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Threading.Tasks; +using Microsoft.FeatureManagement; namespace Tests.FeatureManagement { diff --git a/tests/Tests.FeatureManagement/IAccountContext.cs b/tests/Tests.FeatureManagement/IAccountContext.cs index 78a9527c..54501183 100644 --- a/tests/Tests.FeatureManagement/IAccountContext.cs +++ b/tests/Tests.FeatureManagement/IAccountContext.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. +// Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -// + namespace Tests.FeatureManagement { interface IAccountContext diff --git a/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs b/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs index fe613254..a11bdcf3 100644 --- a/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs +++ b/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs @@ -1,14 +1,47 @@ -using Microsoft.FeatureManagement; + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement; +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement; +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement; +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Microsoft.FeatureManagement; namespace Tests.FeatureManagement { class InMemoryFeatureDefinitionProvider : IFeatureDefinitionProvider, IFeatureDefinitionProviderCacheable { - private IEnumerable _definitions; + private readonly IEnumerable _definitions; public InMemoryFeatureDefinitionProvider(IEnumerable featureDefinitions) { diff --git a/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs b/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs index 0fab5063..9f2a03ad 100644 --- a/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs +++ b/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs @@ -1,8 +1,38 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Threading.Tasks; +using Microsoft.FeatureManagement; namespace Tests.FeatureManagement { diff --git a/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs b/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs index 869d3399..7f699748 100644 --- a/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs +++ b/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs @@ -1,13 +1,43 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.FeatureManagement; using Xunit; namespace Tests.FeatureManagement diff --git a/tests/Tests.FeatureManagement/OnDemandClock.cs b/tests/Tests.FeatureManagement/OnDemandClock.cs index c639a3e3..eda09eac 100644 --- a/tests/Tests.FeatureManagement/OnDemandClock.cs +++ b/tests/Tests.FeatureManagement/OnDemandClock.cs @@ -1,5 +1,38 @@ -using Microsoft.FeatureManagement.FeatureFilters; + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +using Microsoft.FeatureManagement.FeatureFilters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement.FeatureFilters; +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +using Microsoft.FeatureManagement.FeatureFilters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement.FeatureFilters; +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +using Microsoft.FeatureManagement.FeatureFilters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + +using Microsoft.FeatureManagement.FeatureFilters; +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; +using Microsoft.FeatureManagement.FeatureFilters; namespace Tests.FeatureManagement { diff --git a/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs b/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs index 7eb7e971..4b65eead 100644 --- a/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs +++ b/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs @@ -1,8 +1,38 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.FeatureManagement.FeatureFilters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System.Threading.Tasks; +using Microsoft.FeatureManagement.FeatureFilters; namespace Tests.FeatureManagement { diff --git a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs index d55c14f7..f8d707ae 100644 --- a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs +++ b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs @@ -1,12 +1,42 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Caching.Memory; -using Microsoft.FeatureManagement; -using Microsoft.FeatureManagement.FeatureFilters; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Collections.Generic; using System.Linq; +using Microsoft.Extensions.Caching.Memory; +using Microsoft.FeatureManagement; +using Microsoft.FeatureManagement.FeatureFilters; using Xunit; namespace Tests.FeatureManagement diff --git a/tests/Tests.FeatureManagement/TestFilter.cs b/tests/Tests.FeatureManagement/TestFilter.cs index 2dbf0f71..1cc2bd23 100644 --- a/tests/Tests.FeatureManagement/TestFilter.cs +++ b/tests/Tests.FeatureManagement/TestFilter.cs @@ -1,10 +1,40 @@ -// Copyright (c) Microsoft Corporation. + +/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' +Before: +// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. // -using Microsoft.Extensions.Configuration; -using Microsoft.FeatureManagement; +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ + +/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' +Before: +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +// +After: +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. +*/ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + using System; using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.FeatureManagement; namespace Tests.FeatureManagement { From f7f7889d6d8818a0edd1215bca9e21a505ef3d7b Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Wed, 29 May 2024 23:55:31 +0800 Subject: [PATCH 5/6] style format --- examples/FeatureFlagDemo/Controllers/HomeController.cs | 2 +- .../AspNetCoreFeatureManagementBuilderExtensions.cs | 4 +++- .../FeatureGateAttribute.cs | 4 +++- .../FeatureGatedAsyncActionFilter.cs | 4 +++- .../IDisabledFeatureHandler.cs | 4 +++- .../InlineDisabledFeatureHandler.cs | 4 +++- .../NotFoundDisabledFeatureHandler.cs | 4 +++- .../TagHelpers/FeatureTagHelper.cs | 4 +++- .../UseForFeatureExtensions.cs | 4 +++- .../ConfigurationFeatureDefinitionProvider.cs | 4 +++- src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs | 4 +++- .../FeatureFilters/PercentageFilter.cs | 4 +++- .../FeatureFilters/TimeWindowFilter.cs | 4 +++- .../FeatureManagementBuilderExtensions.cs | 4 +++- src/Microsoft.FeatureManagement/FeatureManager.cs | 4 +++- .../ServiceCollectionExtensions.cs | 4 +++- .../Targeting/ContextualTargetingFilter.cs | 4 +++- src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs | 4 +++- .../FeatureManagementAspNetCore.cs | 2 ++ tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs | 4 +++- tests/Tests.FeatureManagement/ContextualTestFilter.cs | 4 +++- tests/Tests.FeatureManagement/CustomTargetingFilter.cs | 4 +++- tests/Tests.FeatureManagement/FeatureManagement.cs | 2 ++ tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs | 4 +++- .../InMemoryFeatureDefinitionProvider.cs | 4 +++- tests/Tests.FeatureManagement/InvalidFeatureFilter.cs | 4 +++- .../MicrosoftFeatureManagementSchema.cs | 4 +++- tests/Tests.FeatureManagement/OnDemandClock.cs | 4 +++- .../OnDemandTargetingContextAccessor.cs | 4 +++- tests/Tests.FeatureManagement/RecurrenceEvaluation.cs | 4 +++- tests/Tests.FeatureManagement/TestFilter.cs | 4 +++- 31 files changed, 89 insertions(+), 29 deletions(-) diff --git a/examples/FeatureFlagDemo/Controllers/HomeController.cs b/examples/FeatureFlagDemo/Controllers/HomeController.cs index c6cdcaa7..7c382add 100644 --- a/examples/FeatureFlagDemo/Controllers/HomeController.cs +++ b/examples/FeatureFlagDemo/Controllers/HomeController.cs @@ -33,7 +33,7 @@ public async Task About() if (await _featureManager.IsEnabledAsync(MyFeatureFlags.CustomViewData)) { ViewData["Message"] = $"This is FANCY CONTENT you can see only if '{MyFeatureFlags.CustomViewData}' is enabled."; - }; + } return View(); } diff --git a/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs index 724b0319..9a954585 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs index cff7ae33..d4a901fe 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs index b1adf471..aac76188 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs index 6a313273..b7454ee4 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs index 25367d87..5e87f168 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs index d9b20d27..34aa7f22 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs b/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs index b43ed793..3e2ac297 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs index 7c6af42b..6a2cf14a 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs index 2e628378..446cb778 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs b/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs index cfdb0734..3c61c986 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs index 96c0523b..091e0fb2 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs index 17d8e1b5..11c51f30 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs b/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs index 0b69ab03..d4040c78 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/FeatureManager.cs b/src/Microsoft.FeatureManagement/FeatureManager.cs index eaf3dbd3..5363a421 100644 --- a/src/Microsoft.FeatureManagement/FeatureManager.cs +++ b/src/Microsoft.FeatureManagement/FeatureManager.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs index a289e98e..339f4d97 100644 --- a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs +++ b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs b/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs index 760e568f..b60ccd34 100644 --- a/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs +++ b/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs b/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs index feb78602..7f9928ee 100644 --- a/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs +++ b/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs b/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs index 8cbf6d33..370c60be 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. /* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net7.0)' Before: diff --git a/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs b/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs index 9c21efdb..6b1c7de8 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net7.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/ContextualTestFilter.cs b/tests/Tests.FeatureManagement/ContextualTestFilter.cs index 1778aca8..3cd48a25 100644 --- a/tests/Tests.FeatureManagement/ContextualTestFilter.cs +++ b/tests/Tests.FeatureManagement/ContextualTestFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs index 7e2037dc..3472b7b8 100644 --- a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs +++ b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/FeatureManagement.cs b/tests/Tests.FeatureManagement/FeatureManagement.cs index 47fef6e9..f8643d63 100644 --- a/tests/Tests.FeatureManagement/FeatureManagement.cs +++ b/tests/Tests.FeatureManagement/FeatureManagement.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: diff --git a/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs b/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs index 7ff7fa08..0161daba 100644 --- a/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs +++ b/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs b/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs index a11bdcf3..7806557a 100644 --- a/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs +++ b/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: using Microsoft.FeatureManagement; diff --git a/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs b/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs index 9f2a03ad..00e8c1c4 100644 --- a/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs +++ b/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs b/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs index 7f699748..a59576ca 100644 --- a/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs +++ b/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/OnDemandClock.cs b/tests/Tests.FeatureManagement/OnDemandClock.cs index eda09eac..eda65103 100644 --- a/tests/Tests.FeatureManagement/OnDemandClock.cs +++ b/tests/Tests.FeatureManagement/OnDemandClock.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: using Microsoft.FeatureManagement.FeatureFilters; diff --git a/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs b/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs index 4b65eead..1f6fde5a 100644 --- a/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs +++ b/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs index f8d707ae..5ed7fc2e 100644 --- a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs +++ b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. diff --git a/tests/Tests.FeatureManagement/TestFilter.cs b/tests/Tests.FeatureManagement/TestFilter.cs index 1cc2bd23..f9b05139 100644 --- a/tests/Tests.FeatureManagement/TestFilter.cs +++ b/tests/Tests.FeatureManagement/TestFilter.cs @@ -1,4 +1,6 @@ - +// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Licensed under the MIT license. + /* Unmerged change from project 'Tests.FeatureManagement(net6.0)' Before: // Copyright (c) Microsoft Corporation. From 3bc8d2239902f70adfe949d92560d7fc4fbb216e Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Thu, 30 May 2024 00:07:08 +0800 Subject: [PATCH 6/6] remove unmerged change --- ...tCoreFeatureManagementBuilderExtensions.cs | 22 ------------- .../FeatureGateAttribute.cs | 22 ------------- .../FeatureGatedAsyncActionFilter.cs | 22 ------------- .../IDisabledFeatureHandler.cs | 22 ------------- .../InlineDisabledFeatureHandler.cs | 22 ------------- .../NotFoundDisabledFeatureHandler.cs | 22 ------------- .../TagHelpers/FeatureTagHelper.cs | 22 ------------- .../UseForFeatureExtensions.cs | 22 ------------- .../ConfigurationFeatureDefinitionProvider.cs | 12 ------- .../FeatureFilterConfiguration.cs | 12 ------- .../FeatureFilters/PercentageFilter.cs | 12 ------- .../FeatureFilters/TimeWindowFilter.cs | 12 ------- .../FeatureManagementBuilderExtensions.cs | 12 ------- .../FeatureManager.cs | 12 ------- .../ServiceCollectionExtensions.cs | 12 ------- .../Targeting/ContextualTargetingFilter.cs | 12 ------- .../Targeting/TargetingFilter.cs | 12 ------- .../FeatureManagementAspNetCore.cs | 23 ------------- .../TestFilter.cs | 22 ------------- .../ContextualTestFilter.cs | 32 ------------------ .../CustomTargetingFilter.cs | 33 ------------------- .../FeatureManagement.cs | 32 ------------------ .../FiltersWithDuplicatedAlias.cs | 32 ------------------ .../InMemoryFeatureDefinitionProvider.cs | 32 ------------------ .../InvalidFeatureFilter.cs | 32 ------------------ .../MicrosoftFeatureManagementSchema.cs | 32 ------------------ .../Tests.FeatureManagement/OnDemandClock.cs | 32 ------------------ .../OnDemandTargetingContextAccessor.cs | 32 ------------------ .../RecurrenceEvaluation.cs | 32 ------------------ tests/Tests.FeatureManagement/TestFilter.cs | 32 ------------------ 30 files changed, 682 deletions(-) diff --git a/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs index 9a954585..650ab8b6 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/AspNetCoreFeatureManagementBuilderExtensions.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs index d4a901fe..ce43a677 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGateAttribute.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs index aac76188..0deb6ac5 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/FeatureGatedAsyncActionFilter.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs index b7454ee4..3f89c4ef 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/IDisabledFeatureHandler.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Filters; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs index 5e87f168..fafc44b7 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/InlineDisabledFeatureHandler.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs b/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs index 34aa7f22..33052693 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/NotFoundDisabledFeatureHandler.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs b/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs index 3e2ac297..cb9137f1 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/TagHelpers/FeatureTagHelper.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs b/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs index 6a2cf14a..3afd2818 100644 --- a/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs +++ b/src/Microsoft.FeatureManagement.AspNetCore/UseForFeatureExtensions.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Microsoft.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; diff --git a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs index 446cb778..c619508f 100644 --- a/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs +++ b/src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs b/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs index 3c61c986..4ee56fa7 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilterConfiguration.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Collections.Generic; using Microsoft.Extensions.Configuration; diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs index 091e0fb2..17b8c325 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/PercentageFilter.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; diff --git a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs index 11c51f30..09af36e0 100644 --- a/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs +++ b/src/Microsoft.FeatureManagement/FeatureFilters/TimeWindowFilter.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.Extensions.Caching.Memory; diff --git a/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs b/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs index d4040c78..e312d7a6 100644 --- a/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs +++ b/src/Microsoft.FeatureManagement/FeatureManagementBuilderExtensions.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Linq; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; diff --git a/src/Microsoft.FeatureManagement/FeatureManager.cs b/src/Microsoft.FeatureManagement/FeatureManager.cs index 5363a421..60179c5c 100644 --- a/src/Microsoft.FeatureManagement/FeatureManager.cs +++ b/src/Microsoft.FeatureManagement/FeatureManager.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs index 339f4d97..a9895cf5 100644 --- a/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs +++ b/src/Microsoft.FeatureManagement/ServiceCollectionExtensions.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs b/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs index b60ccd34..113c3a44 100644 --- a/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs +++ b/src/Microsoft.FeatureManagement/Targeting/ContextualTargetingFilter.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Linq; using System.Security.Cryptography; diff --git a/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs b/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs index 7f9928ee..f7c5efa7 100644 --- a/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs +++ b/src/Microsoft.FeatureManagement/Targeting/TargetingFilter.cs @@ -1,18 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Microsoft.FeatureManagement(netstandard2.1)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; diff --git a/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs b/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs index 370c60be..b27fc7a7 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/FeatureManagementAspNetCore.cs @@ -1,29 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using System; using System.Collections.Generic; using System.Linq; using System.Net; diff --git a/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs b/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs index 6b1c7de8..1ec8a970 100644 --- a/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs +++ b/tests/Tests.FeatureManagement.AspNetCore/TestFilter.cs @@ -1,28 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement.AspNetCore(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; diff --git a/tests/Tests.FeatureManagement/ContextualTestFilter.cs b/tests/Tests.FeatureManagement/ContextualTestFilter.cs index 3cd48a25..f925d29c 100644 --- a/tests/Tests.FeatureManagement/ContextualTestFilter.cs +++ b/tests/Tests.FeatureManagement/ContextualTestFilter.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.FeatureManagement; diff --git a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs index 3472b7b8..4250885f 100644 --- a/tests/Tests.FeatureManagement/CustomTargetingFilter.cs +++ b/tests/Tests.FeatureManagement/CustomTargetingFilter.cs @@ -1,41 +1,8 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement; diff --git a/tests/Tests.FeatureManagement/FeatureManagement.cs b/tests/Tests.FeatureManagement/FeatureManagement.cs index f8643d63..65116573 100644 --- a/tests/Tests.FeatureManagement/FeatureManagement.cs +++ b/tests/Tests.FeatureManagement/FeatureManagement.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using System.IO; diff --git a/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs b/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs index 0161daba..cf593fd4 100644 --- a/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs +++ b/tests/Tests.FeatureManagement/FiltersWithDuplicatedAlias.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Threading.Tasks; using Microsoft.FeatureManagement; diff --git a/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs b/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs index 7806557a..12675814 100644 --- a/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs +++ b/tests/Tests.FeatureManagement/InMemoryFeatureDefinitionProvider.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -using Microsoft.FeatureManagement; -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using Microsoft.FeatureManagement; -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -using Microsoft.FeatureManagement; -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using Microsoft.FeatureManagement; -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -using Microsoft.FeatureManagement; -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using Microsoft.FeatureManagement; -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using System.Linq; diff --git a/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs b/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs index 00e8c1c4..67799503 100644 --- a/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs +++ b/tests/Tests.FeatureManagement/InvalidFeatureFilter.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Threading.Tasks; using Microsoft.FeatureManagement; diff --git a/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs b/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs index a59576ca..97cfb90d 100644 --- a/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs +++ b/tests/Tests.FeatureManagement/MicrosoftFeatureManagementSchema.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.IO; using System.Linq; using System.Text; diff --git a/tests/Tests.FeatureManagement/OnDemandClock.cs b/tests/Tests.FeatureManagement/OnDemandClock.cs index eda65103..89a9d431 100644 --- a/tests/Tests.FeatureManagement/OnDemandClock.cs +++ b/tests/Tests.FeatureManagement/OnDemandClock.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -using Microsoft.FeatureManagement.FeatureFilters; -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using Microsoft.FeatureManagement.FeatureFilters; -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -using Microsoft.FeatureManagement.FeatureFilters; -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using Microsoft.FeatureManagement.FeatureFilters; -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -using Microsoft.FeatureManagement.FeatureFilters; -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - -using Microsoft.FeatureManagement.FeatureFilters; -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using Microsoft.FeatureManagement.FeatureFilters; diff --git a/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs b/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs index 1f6fde5a..c9f58e1d 100644 --- a/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs +++ b/tests/Tests.FeatureManagement/OnDemandTargetingContextAccessor.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System.Threading.Tasks; using Microsoft.FeatureManagement.FeatureFilters; diff --git a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs index 5ed7fc2e..07d08083 100644 --- a/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs +++ b/tests/Tests.FeatureManagement/RecurrenceEvaluation.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Collections.Generic; using System.Linq; diff --git a/tests/Tests.FeatureManagement/TestFilter.cs b/tests/Tests.FeatureManagement/TestFilter.cs index f9b05139..040cd0f2 100644 --- a/tests/Tests.FeatureManagement/TestFilter.cs +++ b/tests/Tests.FeatureManagement/TestFilter.cs @@ -1,38 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. // Licensed under the MIT license. -/* Unmerged change from project 'Tests.FeatureManagement(net6.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net7.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ - -/* Unmerged change from project 'Tests.FeatureManagement(net8.0)' -Before: -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -// -After: -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. -*/ -// Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. - using System; using System.Threading.Tasks; using Microsoft.Extensions.Configuration;