Skip to content

Commit

Permalink
1.6.0, 인스턴스를 생성하지 않고 static class 만 사용하도록. 상속할 이유가 없다.
Browse files Browse the repository at this point in the history
  • Loading branch information
Newp committed Feb 3, 2024
1 parent 824b217 commit ab2f18a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/Npgg.Configuration/ConfigurationLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
namespace Npgg.Configuration
{

public class CsvLoader : ConfigurationLoader
public static class CsvLoader : ConfigurationLoader

Check failure on line 13 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Static class 'CsvLoader' cannot derive from type 'ConfigurationLoader'. Static classes must derive from object.

Check failure on line 13 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Static class 'CsvLoader' cannot derive from type 'ConfigurationLoader'. Static classes must derive from object.
{
static CsvLoader _shared = null;

Check failure on line 15 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Cannot declare a variable of static type 'CsvLoader'
public static CsvLoader Shared =>_shared ?? (_shared = new CsvLoader());

Check failure on line 16 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

'CsvLoader': static types cannot be used as return types
public const string SplitPatten = ",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))";
public CsvLoader() : base(SplitPatten)
CsvLoader() : base(SplitPatten)

Check failure on line 18 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Static classes cannot have instance constructors

Check failure on line 18 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Static classes cannot have instance constructors
{

}
}
public class TsvLoader : ConfigurationLoader
public static class TsvLoader : ConfigurationLoader

Check failure on line 23 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Static class 'TsvLoader' cannot derive from type 'ConfigurationLoader'. Static classes must derive from object.
{
static TsvLoader _shared = null;

Check failure on line 25 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Cannot declare a variable of static type 'TsvLoader'
public static TsvLoader Shared => _shared ?? (_shared = new TsvLoader());

Check failure on line 26 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

'TsvLoader': static types cannot be used as return types
public const string SplitPatten = "\t(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)";

public TsvLoader() : base(SplitPatten)
TsvLoader() : base(SplitPatten)

Check failure on line 29 in src/Npgg.Configuration/ConfigurationLoader.cs

View workflow job for this annotation

GitHub Actions / build

Static classes cannot have instance constructors
{

}
Expand Down
5 changes: 2 additions & 3 deletions src/Npgg.Configuration/Npgg.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
<Copyright></Copyright>
<Description>Csv,Tsv string to c# object deserializer</Description>
<PackageProjectUrl>https://github.com/Newp/Npgg.Configuration</PackageProjectUrl>
<AssemblyVersion>1.5.2.0</AssemblyVersion>
<FileVersion>1.5.2.0</FileVersion>
<Version>1.5.2</Version>
<Version>1.6.0</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
<RepositoryUrl>https://github.com/Newp/Npgg.Configuration</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>csv tsv convert parse</PackageTags>
Expand Down

0 comments on commit ab2f18a

Please sign in to comment.