-
Notifications
You must be signed in to change notification settings - Fork 281
/
Copy pathCollectObject.cs
44 lines (39 loc) · 1.13 KB
/
CollectObject.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.
using Microsoft.CST.AttackSurfaceAnalyzer.Types;
using Microsoft.CST.AttackSurfaceAnalyzer.Utils;
using Newtonsoft.Json;
using System.Globalization;
namespace Microsoft.CST.AttackSurfaceAnalyzer.Objects
{
/// <summary>
/// Abstract parent class that all Collected data inherits from.
/// </summary>
public abstract class CollectObject
{
public abstract string Identity { get; }
public RESULT_TYPE ResultType { get; set; }
[SkipCompare]
[JsonIgnore]
public string RowKey
{
get
{
return Serialized.GetHashCode().ToString(CultureInfo.InvariantCulture);
}
}
[SkipCompare]
[JsonIgnore]
public string Serialized
{
get
{
if (_serialized == null)
{
_serialized = JsonUtils.Dehydrate(this);
}
return _serialized;
}
}
private string? _serialized = null;
}
}