/
EventSourceCreationData.cs
47 lines (35 loc) · 1.26 KB
/
EventSourceCreationData.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
45
46
47
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Diagnostics
{
public class EventSourceCreationData
{
private int _categoryCount;
private EventSourceCreationData() { }
public EventSourceCreationData(string source, string logName)
{
Source = source;
LogName = logName;
}
internal EventSourceCreationData(string source, string logName, string machineName) : this(source, logName)
{
MachineName = machineName;
}
public string LogName { get; set; } = "Application";
public string MachineName { get; set; } = ".";
public string Source { get; set; }
public string MessageResourceFile { get; set; }
public string ParameterResourceFile { get; set; }
public string CategoryResourceFile { get; set; }
public int CategoryCount
{
get { return _categoryCount; }
set
{
if (value > ushort.MaxValue || value < 0)
throw new ArgumentOutOfRangeException(nameof(CategoryCount));
_categoryCount = value;
}
}
}
}