Skip to content

Commit 684202f

Browse files
committed
Support clearing aliases.
1 parent 3d0c250 commit 684202f

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Unitfly.MFiles.DevTools.AliasUpdate.App/AliasUpdater.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class AliasUpdater : AliasesOperations
1010
public AliasUpdater(LoginType loginType, string vaultName, string username, string password,
1111
string domain = null, string protocolSequence = "ncacn_ip_tcp", string networkAddress = "localhost",
1212
string endpoint = "2266", bool encryptedConnection = false, string localComputerName = "")
13-
: base(Log.Logger,
13+
: base(Log.Logger,
1414
loginType: loginType,
1515
vaultName: vaultName,
1616
username: username,
@@ -27,47 +27,47 @@ public AliasUpdater(LoginType loginType, string vaultName, string username, stri
2727
public void SetAliases(AliasTemplates names, CaseConverter converter, UpdateBehaviour behaviour)
2828
{
2929
var aliasUpdateBehaviour = behaviour.GetUpdateBehaviour();
30-
if (!string.IsNullOrWhiteSpace(names?.ObjectType))
30+
if (names?.ObjectType != null)
3131
{
3232
UpdateObjTypeAliases(names.ObjectType, converter, aliasUpdateBehaviour);
3333
}
3434

35-
if (!string.IsNullOrWhiteSpace(names?.ValueList))
35+
if (names?.ValueList!= null)
3636
{
3737
UpdateValueListAliases(names.ValueList, converter, aliasUpdateBehaviour);
3838
}
3939

40-
if (!string.IsNullOrWhiteSpace(names?.PropertyDef))
40+
if (names?.PropertyDef!= null)
4141
{
4242
UpdatePropertyDefAliases(names.PropertyDef, converter, aliasUpdateBehaviour);
4343
}
4444

45-
if (!string.IsNullOrWhiteSpace(names?.Class))
45+
if (names?.Class!= null)
4646
{
4747
UpdateClassAliases(names.Class, converter, aliasUpdateBehaviour);
4848
}
4949

50-
if (!string.IsNullOrWhiteSpace(names?.Workflow))
50+
if (names?.Workflow!= null)
5151
{
5252
UpdateWorkflowAliases(names.Workflow, converter, aliasUpdateBehaviour);
5353
}
5454

55-
if (!string.IsNullOrWhiteSpace(names?.State))
55+
if (names?.State!= null)
5656
{
5757
UpdateStateAliases(names.State, converter, aliasUpdateBehaviour);
5858
}
5959

60-
if (!string.IsNullOrWhiteSpace(names?.StateTransition))
60+
if (names?.StateTransition!= null)
6161
{
6262
UpdateStateTransitionAliases(names.StateTransition, converter, aliasUpdateBehaviour);
6363
}
6464

65-
if (!string.IsNullOrWhiteSpace(names?.UserGroup))
65+
if (names?.UserGroup!= null)
6666
{
6767
UpdateUserGroupAliases(names.UserGroup, converter, aliasUpdateBehaviour);
6868
}
6969

70-
if (!string.IsNullOrWhiteSpace(names?.NamedACL))
70+
if (names?.NamedACL!= null)
7171
{
7272
UpdateNamedACLAliases(names.NamedACL, converter, aliasUpdateBehaviour);
7373
}

0 commit comments

Comments
 (0)