Skip to content

Commit e7edca9

Browse files
committed
fix: Allowed custom recorder options
1 parent c20288d commit e7edca9

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/Framework/Infrastructure/Infrastructure.Common/Recording/RecorderOptions.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ public class RecorderOptions
9292
}
9393
};
9494

95+
public RecorderOptions() : this(string.Empty, new RecordingEnvironmentOptions(), new RecordingEnvironmentOptions())
96+
{
97+
}
98+
99+
public RecorderOptions(string usageComponentName, RecordingEnvironmentOptions production,
100+
RecordingEnvironmentOptions testing)
101+
{
102+
UsageComponentName = usageComponentName;
103+
Production = production;
104+
Testing = testing;
105+
}
106+
95107
public RecordingEnvironmentOptions CurrentEnvironment
96108
{
97109
get
@@ -104,11 +116,11 @@ public RecordingEnvironmentOptions CurrentEnvironment
104116
}
105117
}
106118

107-
public RecordingEnvironmentOptions Production { get; private set; } = new();
119+
public RecordingEnvironmentOptions Production { get; init; }
108120

109-
public RecordingEnvironmentOptions Testing { get; private set; } = new();
121+
public RecordingEnvironmentOptions Testing { get; init; }
110122

111-
public string UsageComponentName { get; private set; } = string.Empty;
123+
public string UsageComponentName { get; init; }
112124
}
113125

114126
/// <summary>

0 commit comments

Comments
 (0)