Show / Hide Table of Contents

Class BaseCompare

The Generic Compare class.

Inheritance
System.Object
BaseCompare
Namespace: Microsoft.CST.AttackSurfaceAnalyzer.Collectors
Assembly: AsaLib.dll
Syntax
public class BaseCompare : object

Constructors

| Improve this Doc View Source

BaseCompare()

Declaration
public BaseCompare()

Properties

| Improve this Doc View Source

Results

Declaration
public ConcurrentDictionary<(RESULT_TYPE, CHANGE_TYPE), List<CompareResult>> Results { get; }
Property Value
Type Description
ConcurrentDictionary<System.ValueTuple<RESULT_TYPE, CHANGE_TYPE>, List<CompareResult>>

Methods

| Improve this Doc View Source

Compare(IEnumerable<CollectObject>, IEnumerable<CollectObject>, Nullable<String>, String)

Declaration
public void Compare(IEnumerable<CollectObject> FirstRunObjects, IEnumerable<CollectObject> SecondRunObjects, string? firstRunId, string secondRunId)
Parameters
Type Name Description
IEnumerable<CollectObject> FirstRunObjects
IEnumerable<CollectObject> SecondRunObjects
System.Nullable<System.String> firstRunId
System.String secondRunId
| Improve this Doc View Source

Compare(IEnumerable<(CollectObject, String)>, IEnumerable<(CollectObject, CollectObject)>, Nullable<String>, String)

Declaration
public void Compare(IEnumerable<(CollectObject, string)> differentObjects, IEnumerable<(CollectObject, CollectObject)> modifiedObjects, string? firstRunId, string secondRunId)
Parameters
Type Name Description
IEnumerable<System.ValueTuple<CollectObject, System.String>> differentObjects
IEnumerable<System.ValueTuple<CollectObject, CollectObject>> modifiedObjects
System.Nullable<System.String> firstRunId
System.String secondRunId
| Improve this Doc View Source

Compare(Nullable<String>, String, DatabaseManager)

Compares all the common collectors between two runs.

Declaration
public void Compare(string? firstRunId, string secondRunId, DatabaseManager databaseManager)
Parameters
Type Name Description
System.Nullable<System.String> firstRunId

The Base run id.

System.String secondRunId

The Compare run id.

DatabaseManager databaseManager
| Improve this Doc View Source

GetDiffs(PropertyInfo, Nullable<Object>, Nullable<Object>)

Creates a list of Diff objects based on an object property and findings.

Declaration
public static List<Diff> GetDiffs(PropertyInfo prop, object? added, object? removed)
Parameters
Type Name Description
PropertyInfo prop

The property of the referenced object.

System.Nullable<System.Object> added

The added findings.

System.Nullable<System.Object> removed

The removed findings.

Returns
Type Description
List<Diff>
| Improve this Doc View Source

IsRunning()

Returns if the comparators are still running.

Declaration
public RUN_STATUS IsRunning()
Returns
Type Description
RUN_STATUS

RUN_STATUS indicating run status.

| Improve this Doc View Source

Start()

Set status to running.

Declaration
public void Start()
| Improve this Doc View Source

Stop()

Sets status to completed.

Declaration
public void Stop()
| Improve this Doc View Source

TryCompare(Nullable<String>, String, DatabaseManager)

Compare but with Start/Stop automatic

Declaration
public bool TryCompare(string? firstRunId, string secondRunId, DatabaseManager databaseManager)
Parameters
Type Name Description
System.Nullable<System.String> firstRunId

The Base run id.

System.String secondRunId

The Compare run id.

DatabaseManager databaseManager
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX