Skip to content

Commit c160f24

Browse files
committed
remove SetFieldMappings
1 parent 1a509c4 commit c160f24

File tree

4 files changed

+1
-37
lines changed

4 files changed

+1
-37
lines changed

src/c#/CoreTest/Bootstrap/GeneralUpdateBootstrapTests.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,6 @@ public void SetConfig_ReturnsBootstrapInstance()
4848
Assert.Same(bootstrap, result);
4949
}
5050

51-
/// <summary>
52-
/// Tests that SetFieldMappings returns the bootstrap instance for chaining.
53-
/// </summary>
54-
[Fact]
55-
public void SetFieldMappings_ReturnsBootstrapInstance()
56-
{
57-
// Arrange
58-
var bootstrap = new GeneralUpdateBootstrap();
59-
var fieldMappings = new Dictionary<string, string>
60-
{
61-
{ "field1", "value1" }
62-
};
63-
64-
// Act
65-
var result = bootstrap.SetFieldMappings(fieldMappings);
66-
67-
// Assert
68-
Assert.Same(bootstrap, result);
69-
}
70-
7151
/// <summary>
7252
/// Tests that SetCustomSkipOption returns the bootstrap instance for chaining.
7353
/// </summary>
@@ -199,7 +179,6 @@ public void MethodChaining_ConfigureBootstrap_ReturnsCorrectInstance()
199179
UpdateUrl = "https://example.com/update",
200180
ClientVersion = "1.0.0"
201181
})
202-
.SetFieldMappings(new Dictionary<string, string> { { "key", "value" } })
203182
.SetCustomSkipOption(() => false)
204183
.AddListenerException((sender, e) => { });
205184

src/c#/GeneralUpdate.Common/Shared/Object/GlobalConfigInfo.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ public class GlobalConfigInfo : BaseConfigInfo
112112
/// </summary>
113113
public bool? PatchEnabled { get; set; }
114114

115-
/// <summary>
116-
/// Dictionary for custom field name mappings.
117-
/// Used for flexible configuration transformations in specific scenarios.
118-
/// </summary>
119-
public Dictionary<string, string> FieldMappings { get; set; }
120-
121115
/// <summary>
122116
/// Directory path where the current version files are backed up before update.
123117
/// Computed by combining InstallPath with a versioned directory name.

src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,7 @@ public GeneralUpdateBootstrap SetConfig(Configinfo configInfo)
8484
InitBlackList();
8585
return this;
8686
}
87-
88-
public GeneralUpdateBootstrap SetFieldMappings(Dictionary<string, string> fieldMappings)
89-
{
90-
_configInfo.FieldMappings = fieldMappings;
91-
return this;
92-
}
93-
87+
9488
public GeneralUpdateBootstrap SetCustomSkipOption(Func<bool>? func)
9589
{
9690
_customSkipOption = func;

src/c#/GeneralUpdate.Upgrad/Program.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ static async Task Main(string[] args)
5050
//整个更新过程出现的任何问题都会通过这个事件通知
5151
.AddListenerException(OnException)
5252
.SetConfig(configinfo)
53-
//设置字段映射表,用于解析所有驱动包的信息的字符串
54-
//.SetFieldMappings(fieldMappingsCN)
5553
//是否开启驱动更新
5654
//.Option(UpdateOption.Drive, true)
5755
//.Option(UpdateOption.Patch, false)
@@ -96,7 +94,6 @@ static async Task Main(string[] args)
9694
.SetDriverFileExtension(fileExtension)
9795
.SetOutPutDirectory(outPutPath)
9896
.SetDriverDirectory(driversPath)
99-
.SetFieldMappings(fieldMappingsCN)
10097
.Build();
10198
10299
var processor = new DriverProcessor();

0 commit comments

Comments
 (0)