Skip to content

Commit b29b86b

Browse files
Merge pull request #473 from microsoft/zhiyuanliang/merge-main-to-preview
Merge main to preview
2 parents 7681f37 + 7557b1d commit b29b86b

File tree

61 files changed

+247
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+247
-204
lines changed

.editorconfig

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
## Default settings ##
7+
[*]
8+
insert_final_newline = true
9+
indent_style = space
10+
indent_size = 4
11+
trim_trailing_whitespace = true
12+
13+
## Formatting rule ##
14+
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055
15+
dotnet_diagnostic.IDE0055.severity = error
16+
17+
# 'Using' directive preferences
18+
dotnet_sort_system_directives_first = false
19+
20+
# New line preferences
21+
dotnet_diagnostic.IDE2002.severity = error
22+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
23+
dotnet_diagnostic.IDE2004.severity = error
24+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
25+
dotnet_diagnostic.IDE2005.severity = error
26+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false
27+
dotnet_diagnostic.IDE2006.severity = error
28+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false
29+
dotnet_diagnostic.IDE2000.severity = error
30+
dotnet_style_allow_multiple_blank_lines_experimental = false
31+
dotnet_diagnostic.IDE2003.severity = error
32+
dotnet_style_allow_statement_immediately_after_block_experimental = false
33+
34+
[*.csproj]
35+
indent_size = 2
36+
charset = utf-8
37+
38+
[*.json]
39+
indent_size = 2

Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
5+
</PropertyGroup>
6+
7+
</Project>

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# .NET Feature Management
22

3+
[![Microsoft.FeatureManagement](https://img.shields.io/nuget/v/Microsoft.FeatureManagement?label=Microsoft.FeatureManagement)](https://www.nuget.org/packages/Microsoft.FeatureManagement)
4+
[![Microsoft.FeatureManagement.AspNetCore](https://img.shields.io/nuget/v/Microsoft.FeatureManagement.AspNetCore?label=Microsoft.FeatureManagement.AspNetCore)](https://www.nuget.org/packages/Microsoft.FeatureManagement.AspNetCore)
5+
36
Feature management provides a way to develop and expose application functionality based on features. Many applications have special requirements when a new feature is developed such as when the feature should be enabled and under what conditions. This library provides a way to define these relationships, and also integrates into common .NET code patterns to make exposing these features possible.
47

58
## Get started

examples/BlazorServerApp/BlazorServerApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
7-
7+
88
<ItemGroup>
99
<ProjectReference Include="..\..\src\Microsoft.FeatureManagement\Microsoft.FeatureManagement.csproj" />
1010
</ItemGroup>

examples/BlazorServerApp/BrowserFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private static bool IsChromeBrowser(string userAgentContext)
4545
return false;
4646
}
4747

48-
return userAgentContext.Contains("chrome", StringComparison.OrdinalIgnoreCase) &&
48+
return userAgentContext.Contains("chrome", StringComparison.OrdinalIgnoreCase) &&
4949
!userAgentContext.Contains("edg", StringComparison.OrdinalIgnoreCase);
5050
}
5151

examples/BlazorServerApp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ public static void Main(string[] args)
4848
app.Run();
4949
}
5050
}
51-
}
51+
}

examples/ConsoleApp/AccountServiceContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
class AccountServiceContext : IAccountContext
55
{
66
public string AccountId { get; set; }
7-
}
7+
}

examples/ConsoleApp/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using Microsoft.Extensions.Configuration;
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
//
4+
using Microsoft.Extensions.Configuration;
25
using Microsoft.Extensions.DependencyInjection;
36
using Microsoft.FeatureManagement;
47

@@ -49,4 +52,4 @@
4952
// Output results
5053
Console.WriteLine($"The {FeatureName} feature is {(enabled ? "enabled" : "disabled")} for the '{account}' account.");
5154
}
52-
}
55+
}

examples/EvaluationDataToApplicationInsights/Pages/Checkout.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ namespace EvaluationDataToApplicationInsights.Pages
55
public class CheckoutModel : PageModel
66
{
77
}
8-
}
8+
}

examples/EvaluationDataToApplicationInsights/Pages/Error.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ public void OnGet()
2424
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
2525
}
2626
}
27-
}
27+
}

0 commit comments

Comments
 (0)