Skip to content

Commit

Permalink
chore: refactor nested if
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Jan 19, 2024
1 parent 367fdb0 commit a1c335b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Runtime/CollectionTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,15 @@ internal async Task<string> StartCollection()

foreach (var wkp in _context.LDAPUtils.GetWellKnownPrincipalOutput(_context.DomainName))
{
if (wkp.ObjectIdentifier.EndsWith(EnterpriseDCSuffix))
if (!wkp.ObjectIdentifier.EndsWith(EnterpriseDCSuffix))
{
if (wkp is Group g && g.Members.Length == 0)
{
continue;
}
wkp.Properties["reconcile"] = false;
}
else
else if (wkp is Group g && g.Members.Length == 0)
{
wkp.Properties["reconcile"] = false;
continue;
}

await _outputChannel.Writer.WriteAsync(wkp);
}

Expand Down

0 comments on commit a1c335b

Please sign in to comment.