Skip to content

Commit

Permalink
Merge pull request #11 from s2quake/revert-8-style/code-style
Browse files Browse the repository at this point in the history
Revert "Apply code style"
  • Loading branch information
s2quake authored Jun 14, 2024
2 parents 31e19d1 + 36f9d10 commit 74f73d0
Show file tree
Hide file tree
Showing 125 changed files with 3,421 additions and 2,501 deletions.
99 changes: 19 additions & 80 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,89 +1,28 @@
# https://editorconfig.org/
root = true
[*.{cs,vb}]

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
tab_width = 8
trim_trailing_whitespace = true
max_line_length = 80
indent_style = space
continuation_indent_size = 4
indent_size = 4
# IDE0060: 사용하지 않는 매개 변수를 제거하세요.
dotnet_code_quality_unused_parameters = non_public:none

[*.{json,ps1,sh,yaml,yml}]
indent_size = 2
continuation_indent_size = 2
# IDE0003: 한정자 제거
dotnet_style_qualification_for_event = false:none

[*.{csproj,xml}]
indent_size = 2
quote_type = double
# IDE0003: 한정자 제거
dotnet_style_qualification_for_field = false:none

[*.cs]
max_line_length = 100
curly_bracket_next_line = true
spaces_around_operators = true
indent_brace_style = Allman
dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols
dotnet_naming_symbols.public_symbols.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public
dotnet_naming_rule.public_members_must_be_capitalized.style = first_word_upper_case_style
dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper
dotnet_naming_rule.public_members_must_be_capitalized.severity = warning
# IDE0003: 한정자 제거
dotnet_style_qualification_for_method = false:none

# SA0001: XML comment analysis is disabled due to project configuration
dotnet_diagnostic.SA0001.severity = none
# IDE0003: 한정자 제거
dotnet_style_qualification_for_property = false:none

# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = none
# IDE0059: 불필요한할당
csharp_style_unused_value_assignment_preference = unused_local_variable:suggestion

# SA1309: Field names should not begin with underscore
dotnet_diagnostic.SA1309.severity = none
# IDE0056: 인덱스 연산자 사용
csharp_style_prefer_index_operator = true:silent

# SA1600: Elements should be documented
dotnet_diagnostic.SA1600.severity = none
# IDE0032: auto 속성 사용
dotnet_style_prefer_auto_properties = true:suggestion

# S1133: Deprecated code should be removed
dotnet_diagnostic.S1133.severity = none

# S1125: Boolean literals should not be redundant
dotnet_diagnostic.S1125.severity = none

# S2372: Exceptions should not be thrown from property getters
dotnet_diagnostic.S2372.severity = none

# S3881: "IDisposable" should be implemented correctly
dotnet_diagnostic.S3881.severity = none

# S3971: "GC.SuppressFinalize" should not be called
dotnet_diagnostic.S3971.severity = none

# S4143: Collection elements should not be replaced unconditionally
dotnet_diagnostic.S4143.severity = none

# S6605: Collection-specific "Exists" method should be used instead of the "Any" extension
dotnet_diagnostic.S6605.severity = none

# S6608: Prefer indexing instead of "Enumerable" methods on types implementing "IList"
dotnet_diagnostic.S6608.severity = none

# MEN007: Use a single return
dotnet_diagnostic.MEN007.severity = none

# MEN016: Avoid top-level statements
dotnet_diagnostic.MEN016.severity = none

[*.csproj]
quote_type = double

[*.sln]
indent_style = tab
indent_size = 2

[hooks/*]
indent_size = 2
continuation_indent_size = 2

[stylecop.json]
max_line_length =
# IDE0057: 범위 연산자 사용
csharp_style_prefer_range_operator = false
5 changes: 0 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"[csharp]": {
"editor.rulers": [
100
]
},
"files.exclude": {
".vs": true,
"**/bin": true,
Expand Down
26 changes: 0 additions & 26 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Condition="'$(SolutionDir)' != '' and '$(SolutionDir)' != '$(MSBuildThisFileDirectory)' and $([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')) != ''" Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>
runtime; build; native; contentfiles; analyzers
</IncludeAssets>
</PackageReference>
<PackageReference Include="Menees.Analyzers" Version="3.2.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.27.0.93347">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)Menees.Analyzers.Settings.xml">
<Link>Menees.Analyzers.Settings.xml</Link>
</AdditionalFiles>
</ItemGroup>

<PropertyGroup>
<TargetFrameworks Condition="'$(_IsPacking)'=='true'">net6.0;net7.0;net8.0;netstandard2.1</TargetFrameworks>
<TargetFramework Condition="'$(_IsPacking)'!='true'">net8.0</TargetFramework>
Expand Down Expand Up @@ -75,10 +51,8 @@ SOFTWARE. -->
<PublishGroup>communication</PublishGroup>
<AssemblyOriginatorKeyFile Condition="Exists('$(MSBuildThisFileDirectory).build/public.snk')">$(MSBuildThisFileDirectory).build/public.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<None Include="$(SolutionDir)LICENSE.md" Pack="true" PackagePath="" />
<None Include="$(SolutionDir)README.md" Pack="true" PackagePath="" />
</ItemGroup>

</Project>
5 changes: 0 additions & 5 deletions Menees.Analyzers.Settings.xml

This file was deleted.

29 changes: 23 additions & 6 deletions src/JSSoft.Communication.Client/ClientContext.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
// <copyright file="ClientContext.cs" company="JSSoft">
// Copyright (c) 2024 Jeesu Choi. All Rights Reserved.
// Licensed under the MIT License. See LICENSE.md in the project root for license information.
// </copyright>
// MIT License
//
// Copyright (c) 2024 Jeesu Choi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System.ComponentModel.Composition;

namespace JSSoft.Communication.Client;
namespace JSSoft.Communication.ConsoleApp;

[Export(typeof(IServiceContext))]
[method: ImportingConstructor]
internal sealed class ClientContext([ImportMany] IService[] services)
sealed class ClientContext([ImportMany] IService[] services)
: Communication.ClientContext(services)
{
}
25 changes: 21 additions & 4 deletions src/JSSoft.Communication.Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
// <copyright file="Program.cs" company="JSSoft">
// Copyright (c) 2024 Jeesu Choi. All Rights Reserved.
// Licensed under the MIT License. See LICENSE.md in the project root for license information.
// </copyright>
// MIT License
//
// Copyright (c) 2024 Jeesu Choi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System;
using JSSoft.Communication.ConsoleApp;
Expand Down
33 changes: 24 additions & 9 deletions src/JSSoft.Communication.Client/Services/DataService.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
// <copyright file="DataService.cs" company="JSSoft">
// Copyright (c) 2024 Jeesu Choi. All Rights Reserved.
// Licensed under the MIT License. See LICENSE.md in the project root for license information.
// </copyright>
// MIT License
//
// Copyright (c) 2024 Jeesu Choi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System;
using System.ComponentModel.Composition;
using System.Threading;
using System.Threading.Tasks;
using JSSoft.Communication.Services;

namespace JSSoft.Communication.Client.Services;
namespace JSSoft.Communication.Services;

[Export(typeof(IService))]
[Export(typeof(IDataService))]
internal sealed class DataService : ClientService<IDataService>, IDataService
sealed class DataService : ClientService<IDataService>, IDataService
{
public Task<DateTime> CreateDataBaseAsync(
string dataBaseName, CancellationToken cancellationToken)
public Task<DateTime> CreateDataBaseAsync(string dataBaseName, CancellationToken cancellationToken)
{
return Server.CreateDataBaseAsync(dataBaseName, cancellationToken);
}
Expand Down
Loading

0 comments on commit 74f73d0

Please sign in to comment.