private async Task Process(IObjectSummary obj) { if (ExcludeByName.Contains(obj.ToString()) || ExcludeByType.Contains(obj.Type)) { return; } await export.AddAsync(obj, Depth); if (!SkipWhereUsed.IsPresent) { switch (obj) { case AddressRange _: case Group _: case GroupWithExclusion _: case Host _: case MulticastAddressRange _: case Network _: case ServiceGroup _: case ServiceDceRpc _: case ServiceICMP _: case ServiceICMP6 _: case ServiceOther _: case ServiceRPC _: case ServiceSCTP _: case ServiceTCP _: case ServiceUDP _: await Process(obj.GetIdentifier()); break; } } }
private async Task Process(IObjectSummary obj) { if (ExcludeByName.Contains(obj.ToString()) || ExcludeByType.Contains(obj.Type)) { return; } await export.AddAsync(obj, Depth); if (!SkipWhereUsed.IsPresent) { switch (obj) { case AddressRange _: case Group _: case GroupWithExclusion _: case Host _: case MulticastAddressRange _: case Network _: case ServiceGroup _: case ServiceDceRpc _: case ServiceICMP _: case ServiceICMP6 _: case ServiceOther _: case ServiceRPC _: case ServiceSCTP _: case ServiceTCP _: case ServiceUDP _: var whereUsed = await Session.FindWhereUsed(identifier : obj.GetIdentifier(), indirect : IndirectWhereUsed.IsPresent, cancellationToken : CancelProcessToken); await export.AddAsync(obj.GetIdentifier(), whereUsed, Depth); break; } } }