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 SourceBaseCompare()
Declaration
public BaseCompare()
Properties
| Improve this Doc View SourceResults
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 SourceCompare(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 |
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 |
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 |
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> |
IsRunning()
Returns if the comparators are still running.
Declaration
public RUN_STATUS IsRunning()
Returns
| Type | Description |
|---|---|
| RUN_STATUS | RUN_STATUS indicating run status. |
Start()
Set status to running.
Declaration
public void Start()
Stop()
Sets status to completed.
Declaration
public void Stop()
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 |