Skip to content

Commit bfa243d

Browse files
committed
Synchronized code with Local Storage v4
1 parent fc2fda0 commit bfa243d

95 files changed

Lines changed: 3161 additions & 615 deletions

File tree

Some content is hidden

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

‎.editorconfig‎

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Don't use tabs for indentation.
5+
[*]
6+
indent_style = space
7+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
8+
9+
# Code files
10+
[*.{cs,csx,vb,vbx}]
11+
indent_size = 4
12+
insert_final_newline = true
13+
charset = utf-8
14+
end_of_line = crlf
15+
16+
# Xml project files
17+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
18+
indent_size = 2
19+
20+
# Xml config files
21+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
22+
indent_size = 2
23+
24+
# JSON files
25+
[*.json]
26+
indent_size = 2
27+
28+
# Dotnet code style settings:
29+
[*.{cs,vb}]
30+
# Sort using and Import directives with System.* appearing first
31+
dotnet_sort_system_directives_first = true
32+
33+
# Avoid "this." and "Me." if not necessary
34+
dotnet_style_qualification_for_field = false : error
35+
dotnet_style_qualification_for_property = false : error
36+
dotnet_style_qualification_for_method = false : error
37+
dotnet_style_qualification_for_event = false : error
38+
39+
# Use language keywords instead of framework type names for type references
40+
dotnet_style_predefined_type_for_locals_parameters_members = true : error
41+
dotnet_style_predefined_type_for_member_access = true : error
42+
43+
# Suggest more modern language features when available
44+
dotnet_style_object_initializer = true : suggestion
45+
dotnet_style_collection_initializer = true : suggestion
46+
dotnet_style_coalesce_expression = true : error
47+
dotnet_style_null_propagation = true : error
48+
dotnet_style_explicit_tuple_names = true : error
49+
50+
# Naming rule: private static fields should use pascal casing
51+
dotnet_naming_symbols.private_static_field.applicable_kinds = field
52+
dotnet_naming_symbols.private_static_field.applicable_accessibilities = private
53+
dotnet_naming_symbols.private_static_field.required_modifiers = static
54+
dotnet_naming_style.private_static_field.capitalization = pascal_case
55+
dotnet_naming_rule.private_static_field.severity = error
56+
dotnet_naming_rule.private_static_field.symbols = private_static_field
57+
dotnet_naming_rule.private_static_field.style = private_static_field
58+
59+
# Naming rule: private fields should use camel casing and use underscore as a prefix
60+
dotnet_naming_symbols.private_field.applicable_kinds = field
61+
dotnet_naming_symbols.private_field.applicable_accessibilities = private
62+
dotnet_naming_style.private_field.capitalization = camel_case
63+
dotnet_naming_style.private_field.required_prefix = _
64+
dotnet_naming_rule.private_field.severity = error
65+
dotnet_naming_rule.private_field.symbols = private_field
66+
dotnet_naming_rule.private_field.style = private_field
67+
68+
# Naming rule: non-private fields should use pascal casing
69+
dotnet_naming_symbols.non_private_field.applicable_kinds = field
70+
dotnet_naming_symbols.non_private_field.applicable_accessibilities = public,internal,friend,protected,protected_internal,protected_friend
71+
dotnet_naming_style.non_private_field.capitalization = pascal_case
72+
dotnet_naming_rule.non_private_field.severity = error
73+
dotnet_naming_rule.non_private_field.symbols = non_private_field
74+
dotnet_naming_rule.non_private_field.style = non_private_field
75+
76+
# Naming rule: parameters should use camel casing
77+
dotnet_naming_symbols.parameter.applicable_kinds = parameter
78+
dotnet_naming_style.parameter.capitalization = camel_case
79+
dotnet_naming_rule.parameter.severity = error
80+
dotnet_naming_rule.parameter.symbols = parameter
81+
dotnet_naming_rule.parameter.style = parameter
82+
83+
# Naming rule: interface types should use pascal casing with I as a prefix
84+
dotnet_naming_symbols.interface_type.applicable_kinds = interface
85+
dotnet_naming_style.interface_type.capitalization = pascal_case
86+
dotnet_naming_style.interface_type.required_prefix = I
87+
dotnet_naming_rule.interface_type.severity = error
88+
dotnet_naming_rule.interface_type.symbols = interface_type
89+
dotnet_naming_rule.interface_type.style = interface_type
90+
91+
# Naming rule: non-interface types should use pascal casing
92+
dotnet_naming_symbols.non_interface_type.applicable_kinds = class,struct,enum,delegate
93+
dotnet_naming_style.non_interface_type.capitalization = pascal_case
94+
dotnet_naming_rule.non_interface_type.severity = error
95+
dotnet_naming_rule.non_interface_type.symbols = non_interface_type
96+
dotnet_naming_rule.non_interface_type.style = non_interface_type
97+
98+
# Naming rule: methods, properties and events should use pascal casing
99+
dotnet_naming_symbols.member.applicable_kinds = method,property,event
100+
dotnet_naming_style.member.capitalization = pascal_case
101+
dotnet_naming_rule.member.severity = error
102+
dotnet_naming_rule.member.symbols = member
103+
dotnet_naming_rule.member.style = member
104+
105+
# CSharp code style settings:
106+
107+
# IDE0060: Remove unused parameter
108+
dotnet_code_quality_unused_parameters = non_public:suggestion
109+
110+
[*.cs]
111+
# Prefer "var" everywhere
112+
csharp_style_var_for_built_in_types = true : suggestion
113+
csharp_style_var_when_type_is_apparent = true : error
114+
csharp_style_var_elsewhere = true : suggestion
115+
116+
# Prefer method-like constructs to have a block body
117+
csharp_style_expression_bodied_methods = false : none
118+
csharp_style_expression_bodied_constructors = false : error
119+
csharp_style_expression_bodied_operators = false : none
120+
121+
# Prefer property-like constructs to have an expression-body
122+
csharp_style_expression_bodied_properties = true : suggestion
123+
csharp_style_expression_bodied_indexers = true : suggestion
124+
csharp_style_expression_bodied_accessors = true : suggestion
125+
126+
# Suggest more modern language features when available
127+
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
128+
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
129+
csharp_style_inlined_variable_declaration = true : suggestion
130+
csharp_style_throw_expression = true : suggestion
131+
csharp_style_conditional_delegate_call = true : suggestion
132+
133+
# Newline settings
134+
csharp_new_line_before_open_brace = all
135+
csharp_new_line_before_else = true
136+
csharp_new_line_before_catch = true
137+
csharp_new_line_before_finally = true
138+
csharp_new_line_before_members_in_object_initializers = true
139+
csharp_new_line_before_members_in_anonymous_types = true
140+
141+
# Spacing
142+
csharp_space_after_cast = false
143+
csharp_space_after_keywords_in_control_flow_statements = true
144+
csharp_space_between_method_call_parameter_list_parentheses = false
145+
csharp_space_between_method_declaration_parameter_list_parentheses = false

‎.github/FUNDING.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
github: [chrissainty]
2-

‎.github/release-drafter.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
name-template: 'v$NEXT_PATCH_VERSION'
1+
name-template: 'v$NEXT_PATCH_VERSION 🌈'
22
tag-template: 'v$NEXT_PATCH_VERSION'
3-
template: |
4-
# What's Changed
5-
6-
$CHANGES
73
categories:
84
- title: '🚀 Features'
95
label: 'Feature'
@@ -13,4 +9,8 @@ categories:
139
label: 'Maintenance'
1410
- title: '📖 Documentation'
1511
label: 'Docs'
16-
change-template: '- (#$NUMBER) $TITLE - Thanks to @$AUTHOR '
12+
change-template: '- (#$NUMBER) $TITLE - Thanks to @$AUTHOR '
13+
template: |
14+
# What's Changed
15+
16+
$CHANGES

‎.github/workflows/ci-main.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types: [ published ]
88

99
env:
10-
NETCORE_VERSION: '3.1.301'
10+
NETCORE_VERSION: '5.0.202'
1111
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1212
DOTNET_CLI_TELEMETRY_OPTOUT: true
1313
PROJECT_NAME: SessionStorage
@@ -50,7 +50,7 @@ jobs:
5050
- name: Rewrite base href
5151
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
5252
with:
53-
html_path: samples/BlazorWebAssembly/bin/Release/netstandard2.1/publish/wwwroot/index.html
53+
html_path: samples/BlazorWebAssembly/bin/Release/net5.0/publish/wwwroot/index.html
5454
base_href: /${{ env.PROJECT_NAME }}/
5555

5656
- name: Deploy to Github Pages
@@ -59,7 +59,7 @@ jobs:
5959
ACCESS_TOKEN: $GITHUB_TOKEN
6060
BASE_BRANCH: main # The branch the action should deploy from.
6161
BRANCH: gh-pages # The branch the action should deploy to.
62-
FOLDER: samples/BlazorWebAssembly/bin/Release/netstandard2.1/publish/wwwroot # The folder the action should deploy.
62+
FOLDER: samples/BlazorWebAssembly/bin/Release/net5.0/publish/wwwroot # The folder the action should deploy.
6363
SINGLE_COMMIT: true
6464

6565
- name: Upload Artifact

‎.github/workflows/ci-pr.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
branches: [ main ]
66

77
env:
8-
PROJECT_NAME: SessionStorage
9-
NETCORE_VERSION: '3.1.301'
8+
NETCORE_VERSION: '5.0.202'
9+
PROJECT_NAME: Blazored.SessionStorage
1010

1111
jobs:
1212
build:
@@ -24,7 +24,7 @@ jobs:
2424
run: dotnet restore
2525

2626
- name: Building project...
27-
run: dotnet build --configuration Release --no-restore src/Blazored.$PROJECT_NAME/Blazored.$PROJECT_NAME.csproj
27+
run: dotnet build --configuration Release --no-restore src/$PROJECT_NAME/$PROJECT_NAME.csproj
2828

2929
- name: Testing...
3030
run: dotnet test --no-restore --verbosity normal
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '28 17 * * 1'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'csharp' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

‎Blazored.SessionStorage.sln‎

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{F20B
99
EndProject
1010
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWebAssembly", "samples\BlazorWebAssembly\BlazorWebAssembly.csproj", "{D6953CE0-6AD5-434C-99AA-7FF1E26724D4}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorServerSide", "samples\BlazorServerSide\BlazorServerSide.csproj", "{767D657A-5410-4714-9477-99929D3FF709}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorServer", "samples\BlazorServer\BlazorServer.csproj", "{767D657A-5410-4714-9477-99929D3FF709}"
1313
EndProject
14-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9B1C958A-85F6-4387-98D9-71CEEE0A2A03}"
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9170D7A9-70CE-48E3-88A3-F11D2983103E}"
1515
ProjectSection(SolutionItems) = preProject
16-
azure-pipelines.yml = azure-pipelines.yml
16+
.github\workflows\ci-main.yml = .github\workflows\ci-main.yml
17+
.github\workflows\ci-pr.yml = .github\workflows\ci-pr.yml
1718
README.md = README.md
19+
.github\workflows\release-drafter.yml = .github\workflows\release-drafter.yml
1820
EndProjectSection
1921
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B82A5126-EE01-4B4D-B642-F954B6E4E695}"
23+
EndProject
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazored.SessionStorage.Tests", "tests\Blazored.SessionStorage.Tests\Blazored.SessionStorage.Tests.csproj", "{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}"
25+
EndProject
26+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bUnitExample", "samples\bUnitExample\bUnitExample.csproj", "{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}"
27+
EndProject
2028
Global
2129
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2230
Debug|Any CPU = Debug|Any CPU
@@ -63,13 +71,39 @@ Global
6371
{767D657A-5410-4714-9477-99929D3FF709}.Release|x64.Build.0 = Release|Any CPU
6472
{767D657A-5410-4714-9477-99929D3FF709}.Release|x86.ActiveCfg = Release|Any CPU
6573
{767D657A-5410-4714-9477-99929D3FF709}.Release|x86.Build.0 = Release|Any CPU
74+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
76+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Debug|x64.ActiveCfg = Debug|Any CPU
77+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Debug|x64.Build.0 = Debug|Any CPU
78+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Debug|x86.ActiveCfg = Debug|Any CPU
79+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Debug|x86.Build.0 = Debug|Any CPU
80+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
81+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Release|Any CPU.Build.0 = Release|Any CPU
82+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Release|x64.ActiveCfg = Release|Any CPU
83+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Release|x64.Build.0 = Release|Any CPU
84+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Release|x86.ActiveCfg = Release|Any CPU
85+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC}.Release|x86.Build.0 = Release|Any CPU
86+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
87+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
88+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Debug|x64.ActiveCfg = Debug|Any CPU
89+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Debug|x64.Build.0 = Debug|Any CPU
90+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Debug|x86.ActiveCfg = Debug|Any CPU
91+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Debug|x86.Build.0 = Debug|Any CPU
92+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
93+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Release|Any CPU.Build.0 = Release|Any CPU
94+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Release|x64.ActiveCfg = Release|Any CPU
95+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Release|x64.Build.0 = Release|Any CPU
96+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Release|x86.ActiveCfg = Release|Any CPU
97+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA}.Release|x86.Build.0 = Release|Any CPU
6698
EndGlobalSection
6799
GlobalSection(SolutionProperties) = preSolution
68100
HideSolutionNode = FALSE
69101
EndGlobalSection
70102
GlobalSection(NestedProjects) = preSolution
71103
{D6953CE0-6AD5-434C-99AA-7FF1E26724D4} = {F20B2AAB-FB71-4A1C-82FE-F1750B922BF6}
72104
{767D657A-5410-4714-9477-99929D3FF709} = {F20B2AAB-FB71-4A1C-82FE-F1750B922BF6}
105+
{5A6A013E-325D-4A5F-B2FA-659B4FD2BDBC} = {B82A5126-EE01-4B4D-B642-F954B6E4E695}
106+
{10F6FB83-3135-4B73-B0EB-D008A31AE8FA} = {F20B2AAB-FB71-4A1C-82FE-F1750B922BF6}
73107
EndGlobalSection
74108
GlobalSection(ExtensibilityGlobals) = postSolution
75109
SolutionGuid = {2B91883F-A85A-49EB-A9C1-ABD567A9375E}

‎Directory.Build.props‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<PropertyGroup Label="Package Versions">
5+
<DotNet3Version>3.1.14</DotNet3Version>
6+
<DotNet5Version>5.0.5</DotNet5Version>
7+
</PropertyGroup>
8+
9+
</Project>

0 commit comments

Comments
 (0)