Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Monitoring / system / Diagnosticts / EventSourceCreationData.cs / 1305376 / EventSourceCreationData.cs
using System.Security;
using System.Security.Permissions;
namespace System.Diagnostics {
public class EventSourceCreationData {
private string _logName = "Application";
private string _machineName = ".";
private string _source;
private string _messageResourceFile;
private string _parameterResourceFile;
private string _categoryResourceFile;
private int _categoryCount;
private EventSourceCreationData() {}
public EventSourceCreationData(string source, string logName) {
_source = source;
_logName = logName;
}
internal EventSourceCreationData(string source, string logName, string machineName) {
_source = source;
_logName = logName;
_machineName = machineName;
}
private EventSourceCreationData(string source, string logName, string machineName,
string messageResourceFile, string parameterResourceFile,
string categoryResourceFile, short categoryCount) {
_source = source;
_logName = logName;
_machineName = machineName;
_messageResourceFile = messageResourceFile;
_parameterResourceFile = parameterResourceFile;
_categoryResourceFile = categoryResourceFile;
CategoryCount = categoryCount;
}
public string LogName {
get { return _logName; }
set { _logName = value; }
}
public string MachineName {
get { return _machineName; }
set { _machineName = value; }
}
public string Source {
get { return _source; }
set { _source = value; }
}
public string MessageResourceFile {
get { return _messageResourceFile; }
set { _messageResourceFile = value; }
}
public string ParameterResourceFile {
get { return _parameterResourceFile; }
set { _parameterResourceFile = value; }
}
public string CategoryResourceFile {
get { return _categoryResourceFile; }
set { _categoryResourceFile = value; }
}
public int CategoryCount {
get { return _categoryCount; }
set {
if (value > UInt16.MaxValue || value < 0)
throw new ArgumentOutOfRangeException("value");
_categoryCount = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System.Security;
using System.Security.Permissions;
namespace System.Diagnostics {
public class EventSourceCreationData {
private string _logName = "Application";
private string _machineName = ".";
private string _source;
private string _messageResourceFile;
private string _parameterResourceFile;
private string _categoryResourceFile;
private int _categoryCount;
private EventSourceCreationData() {}
public EventSourceCreationData(string source, string logName) {
_source = source;
_logName = logName;
}
internal EventSourceCreationData(string source, string logName, string machineName) {
_source = source;
_logName = logName;
_machineName = machineName;
}
private EventSourceCreationData(string source, string logName, string machineName,
string messageResourceFile, string parameterResourceFile,
string categoryResourceFile, short categoryCount) {
_source = source;
_logName = logName;
_machineName = machineName;
_messageResourceFile = messageResourceFile;
_parameterResourceFile = parameterResourceFile;
_categoryResourceFile = categoryResourceFile;
CategoryCount = categoryCount;
}
public string LogName {
get { return _logName; }
set { _logName = value; }
}
public string MachineName {
get { return _machineName; }
set { _machineName = value; }
}
public string Source {
get { return _source; }
set { _source = value; }
}
public string MessageResourceFile {
get { return _messageResourceFile; }
set { _messageResourceFile = value; }
}
public string ParameterResourceFile {
get { return _parameterResourceFile; }
set { _parameterResourceFile = value; }
}
public string CategoryResourceFile {
get { return _categoryResourceFile; }
set { _categoryResourceFile = value; }
}
public int CategoryCount {
get { return _categoryCount; }
set {
if (value > UInt16.MaxValue || value < 0)
throw new ArgumentOutOfRangeException("value");
_categoryCount = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WCFServiceClientProxyGenerator.cs
- InstanceDescriptor.cs
- OracleInternalConnection.cs
- Point3DValueSerializer.cs
- UdpTransportBindingElement.cs
- TemplateControlParser.cs
- MaskedTextProvider.cs
- ToolStripContainerDesigner.cs
- ConnectionInterfaceCollection.cs
- ListView.cs
- TextTreeFixupNode.cs
- RadioButtonFlatAdapter.cs
- BindingExpression.cs
- ActivityXRefPropertyEditor.cs
- SignatureHelper.cs
- hresults.cs
- ToolStripSystemRenderer.cs
- DATA_BLOB.cs
- Encoder.cs
- OrderedHashRepartitionStream.cs
- PackageDigitalSignature.cs
- ProtocolViolationException.cs
- EventMemberCodeDomSerializer.cs
- CompilerHelpers.cs
- NamedPipeHostedTransportConfiguration.cs
- TraceUtility.cs
- ByteAnimationBase.cs
- ToolboxComponentsCreatingEventArgs.cs
- ConfigurationSectionGroupCollection.cs
- XmlAttribute.cs
- ContentAlignmentEditor.cs
- SineEase.cs
- DataContractSerializerOperationBehavior.cs
- StringInfo.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- NullRuntimeConfig.cs
- WebEventCodes.cs
- WSHttpBindingBase.cs
- Matrix3DConverter.cs
- FileClassifier.cs
- AssociationSetEnd.cs
- TransformerTypeCollection.cs
- DataGridViewRowCancelEventArgs.cs
- ColumnResizeUndoUnit.cs
- TableCell.cs
- ProcessThreadCollection.cs
- XomlCompiler.cs
- NeutralResourcesLanguageAttribute.cs
- DecoderFallback.cs
- Stack.cs
- FloaterBaseParaClient.cs
- DESCryptoServiceProvider.cs
- ProfileManager.cs
- SecurityTokenAuthenticator.cs
- XmlILConstructAnalyzer.cs
- SystemColors.cs
- Drawing.cs
- InplaceBitmapMetadataWriter.cs
- ContentElement.cs
- ISAPIWorkerRequest.cs
- HiddenField.cs
- CodeEventReferenceExpression.cs
- ListControl.cs
- ExecutionContext.cs
- sqlser.cs
- EncoderNLS.cs
- CodeAttributeArgument.cs
- BuilderInfo.cs
- WebException.cs
- HttpCapabilitiesSectionHandler.cs
- ButtonAutomationPeer.cs
- KeyInfo.cs
- Calendar.cs
- InternalBufferOverflowException.cs
- LoadGrammarCompletedEventArgs.cs
- SafeFileMapViewHandle.cs
- DataBoundControl.cs
- DataRowCollection.cs
- ProjectionCamera.cs
- ProxyWebPartManagerDesigner.cs
- CircleHotSpot.cs
- TextPatternIdentifiers.cs
- StructuralType.cs
- FixedBufferAttribute.cs
- Behavior.cs
- SqlGenericUtil.cs
- LocalizationComments.cs
- EndpointBehaviorElementCollection.cs
- RawStylusInputCustomData.cs
- ResourcesChangeInfo.cs
- VectorAnimationUsingKeyFrames.cs
- TimeSpanMinutesConverter.cs
- XamlSerializer.cs
- FrameworkRichTextComposition.cs
- DateTimeOffsetAdapter.cs
- ConsoleTraceListener.cs
- ProfilePropertyNameValidator.cs
- DiscoveryDocumentReference.cs
- _ConnectOverlappedAsyncResult.cs
- HandleCollector.cs