mscorlib(4.0.0.0) API with additions
EventSourceCreationData.cs
1 namespace System.Diagnostics
2 {
5  {
6  private string _logName = "Application";
7 
8  private string _machineName = ".";
9 
10  private string _source;
11 
12  private string _messageResourceFile;
13 
14  private string _parameterResourceFile;
15 
16  private string _categoryResourceFile;
17 
18  private int _categoryCount;
19 
22  public string LogName
23  {
24  get
25  {
26  return _logName;
27  }
28  set
29  {
30  _logName = value;
31  }
32  }
33 
37  public string MachineName
38  {
39  get
40  {
41  return _machineName;
42  }
43  set
44  {
45  _machineName = value;
46  }
47  }
48 
51  public string Source
52  {
53  get
54  {
55  return _source;
56  }
57  set
58  {
59  _source = value;
60  }
61  }
62 
65  public string MessageResourceFile
66  {
67  get
68  {
69  return _messageResourceFile;
70  }
71  set
72  {
73  _messageResourceFile = value;
74  }
75  }
76 
79  public string ParameterResourceFile
80  {
81  get
82  {
83  return _parameterResourceFile;
84  }
85  set
86  {
87  _parameterResourceFile = value;
88  }
89  }
90 
93  public string CategoryResourceFile
94  {
95  get
96  {
97  return _categoryResourceFile;
98  }
99  set
100  {
101  _categoryResourceFile = value;
102  }
103  }
104 
108  public int CategoryCount
109  {
110  get
111  {
112  return _categoryCount;
113  }
114  set
115  {
116  if (value > 65535 || value < 0)
117  {
118  throw new ArgumentOutOfRangeException("value");
119  }
120  _categoryCount = value;
121  }
122  }
123 
124  private EventSourceCreationData()
125  {
126  }
127 
131  public EventSourceCreationData(string source, string logName)
132  {
133  _source = source;
134  _logName = logName;
135  }
136 
137  internal EventSourceCreationData(string source, string logName, string machineName)
138  {
139  _source = source;
140  _logName = logName;
141  _machineName = machineName;
142  }
143 
144  private EventSourceCreationData(string source, string logName, string machineName, string messageResourceFile, string parameterResourceFile, string categoryResourceFile, short categoryCount)
145  {
146  _source = source;
147  _logName = logName;
148  _machineName = machineName;
149  _messageResourceFile = messageResourceFile;
150  _parameterResourceFile = parameterResourceFile;
151  _categoryResourceFile = categoryResourceFile;
152  CategoryCount = categoryCount;
153  }
154  }
155 }
string Source
Gets or sets the name to register with the event log as an event source.
string MessageResourceFile
Gets or sets the path of the message resource file that contains message formatting strings for the s...
Represents the configuration settings used to create an event log source on the local computer or a r...
The exception that is thrown when the value of an argument is outside the allowable range of values a...
string MachineName
Gets or sets the name of the computer on which to register the event source.
int CategoryCount
Gets or sets the number of categories in the category resource file.
string LogName
Gets or sets the name of the event log to which the source writes entries.
string ParameterResourceFile
Gets or sets the path of the resource file that contains message parameter strings for the source.
string CategoryResourceFile
Gets or sets the path of the resource file that contains category strings for the source.
EventSourceCreationData(string source, string logName)
Initializes a new instance of the T:System.Diagnostics.EventSourceCreationData class with a specified...