Skip to content

Commit 70a1677

Browse files
authored
Merge pull request #23 from beheshty/refactor/remove-setsharp-skiping-logic
Refactor/remove setsharp skiping logic
2 parents d4a5128 + ed2a100 commit 70a1677

4 files changed

Lines changed: 2 additions & 28 deletions

File tree

src/SetSharp/AnalyzerReleases.Shipped.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; Shipped analyzer release
22

3-
### 3.0.0
3+
### 3.0.1
44

55
Rule ID | Category | Severity | Notes
66
--------|----------|----------|-------

src/SetSharp/ModelBuilder/ConfigurationModelBuilder.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ private void ProcessObject(SettingClassInfo SettingClassInfo, Dictionary<string,
2020
{
2121
foreach (var item in obj)
2222
{
23-
if (string.Equals(item.Key, "SetSharp", StringComparison.OrdinalIgnoreCase))
24-
{
25-
continue;
26-
}
2723
var propertyModel = new SettingPropertyInfo
2824
{
2925
OriginalJsonKey = item.Key,

src/SetSharp/SetSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111

1212
<PackageId>SetSharp</PackageId>
13-
<Version>3.0.0</Version>
13+
<Version>3.0.1</Version>
1414
<PackageIcon>icon.png</PackageIcon>
1515
<Authors>Amirhossein Beheshti</Authors>
1616
<Description>Generates strongly typed settings classes from appsettings.json using Source Generators.</Description>

tests/SetSharp.Tests/ModelBuilder/ConfigurationModelBuilderTests.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,6 @@ public void BuildFrom_WithFlatPrimitives_ShouldCreateModelCorrectly()
3434
Assert.Equal("double", rootModel.Properties.First(p => p.PropertyName == "DefaultThreshold").PropertyType);
3535
}
3636

37-
[Fact]
38-
public void BuildFrom_WithSetSharpSection_ShouldIgnoreSetSharp()
39-
{
40-
// Arrange
41-
var builder = new ConfigurationModelBuilder();
42-
var root = new Dictionary<string, object>
43-
{
44-
{ "ConnectionString", "Server=.;Database=Test;"},
45-
{ "SetSharp", new Dictionary<string, object>() }
46-
};
47-
48-
// Act
49-
var result = builder.BuildFrom(root);
50-
51-
// Assert
52-
var rootModel = Assert.Single(result);
53-
Assert.Equal("RootOptions", rootModel.ClassName);
54-
Assert.Equal("", rootModel.SectionPath);
55-
56-
Assert.DoesNotContain(result, c => c.ClassName == "SetSharp");
57-
}
58-
5937
[Fact]
6038
public void BuildFrom_WithNestedObject_ShouldCreateSeparateClassModel()
6139
{

0 commit comments

Comments
 (0)