Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Services / Monitoring / system / Diagnosticts / CounterCreationData.cs / 1 / CounterCreationData.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Diagnostics {
using System.Diagnostics;
using System;
using System.ComponentModel;
///
/// A struct defining the counter type, name and help string for a custom counter.
///
[
TypeConverter("System.Diagnostics.Design.CounterCreationDataConverter, " + AssemblyRef.SystemDesign),
Serializable
]
public class CounterCreationData {
private PerformanceCounterType counterType = PerformanceCounterType.NumberOfItems32;
private string counterName = String.Empty;
private string counterHelp = String.Empty;
///
/// [To be supplied.]
///
public CounterCreationData() {
}
///
/// [To be supplied.]
///
public CounterCreationData(string counterName, string counterHelp, PerformanceCounterType counterType) {
CounterType = counterType;
CounterName = counterName;
CounterHelp = counterHelp;
}
///
/// [To be supplied.]
///
[
DefaultValue(PerformanceCounterType.NumberOfItems32),
MonitoringDescription(SR.CounterType)
]
public PerformanceCounterType CounterType {
get {
return counterType;
}
set {
if (!Enum.IsDefined(typeof(PerformanceCounterType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(PerformanceCounterType));
counterType = value;
}
}
///
/// [To be supplied.]
///
[
DefaultValue(""),
MonitoringDescription(SR.CounterName),
TypeConverter("System.Diagnostics.Design.StringValueConverter, " + AssemblyRef.SystemDesign)
]
public string CounterName {
get {
return counterName;
}
set {
PerformanceCounterCategory.CheckValidCounter(value);
counterName = value;
}
}
///
/// [To be supplied.]
///
[
DefaultValue(""),
MonitoringDescription(SR.CounterHelp)
]
public string CounterHelp {
get {
return counterHelp;
}
set {
PerformanceCounterCategory.CheckValidHelp(value);
counterHelp = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Diagnostics {
using System.Diagnostics;
using System;
using System.ComponentModel;
///
/// A struct defining the counter type, name and help string for a custom counter.
///
[
TypeConverter("System.Diagnostics.Design.CounterCreationDataConverter, " + AssemblyRef.SystemDesign),
Serializable
]
public class CounterCreationData {
private PerformanceCounterType counterType = PerformanceCounterType.NumberOfItems32;
private string counterName = String.Empty;
private string counterHelp = String.Empty;
///
/// [To be supplied.]
///
public CounterCreationData() {
}
///
/// [To be supplied.]
///
public CounterCreationData(string counterName, string counterHelp, PerformanceCounterType counterType) {
CounterType = counterType;
CounterName = counterName;
CounterHelp = counterHelp;
}
///
/// [To be supplied.]
///
[
DefaultValue(PerformanceCounterType.NumberOfItems32),
MonitoringDescription(SR.CounterType)
]
public PerformanceCounterType CounterType {
get {
return counterType;
}
set {
if (!Enum.IsDefined(typeof(PerformanceCounterType), value))
throw new InvalidEnumArgumentException("value", (int)value, typeof(PerformanceCounterType));
counterType = value;
}
}
///
/// [To be supplied.]
///
[
DefaultValue(""),
MonitoringDescription(SR.CounterName),
TypeConverter("System.Diagnostics.Design.StringValueConverter, " + AssemblyRef.SystemDesign)
]
public string CounterName {
get {
return counterName;
}
set {
PerformanceCounterCategory.CheckValidCounter(value);
counterName = value;
}
}
///
/// [To be supplied.]
///
[
DefaultValue(""),
MonitoringDescription(SR.CounterHelp)
]
public string CounterHelp {
get {
return counterHelp;
}
set {
PerformanceCounterCategory.CheckValidHelp(value);
counterHelp = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlNodeAnnotations.cs
- FullTextLine.cs
- XslException.cs
- ExpandSegmentCollection.cs
- Transform.cs
- ProfileModule.cs
- WebPartChrome.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ServiceOperationDetailViewControl.cs
- DefaultShape.cs
- IISMapPath.cs
- AppDomainManager.cs
- SqlXml.cs
- WebServiceHost.cs
- OleDbRowUpdatedEvent.cs
- MsmqAppDomainProtocolHandler.cs
- BookmarkTable.cs
- WebPartZoneBase.cs
- RbTree.cs
- Int16AnimationUsingKeyFrames.cs
- WebBrowserDocumentCompletedEventHandler.cs
- Axis.cs
- ParseHttpDate.cs
- TypeInfo.cs
- XmlSerializerFaultFormatter.cs
- EntityAdapter.cs
- Int32RectConverter.cs
- LogConverter.cs
- TextComposition.cs
- AttachedAnnotationChangedEventArgs.cs
- TableProviderWrapper.cs
- Signature.cs
- SoapSchemaImporter.cs
- CheckableControlBaseAdapter.cs
- Int64KeyFrameCollection.cs
- HandlerFactoryWrapper.cs
- CodeAttributeArgumentCollection.cs
- DisplayNameAttribute.cs
- CompositionTarget.cs
- SessionSwitchEventArgs.cs
- SharedPersonalizationStateInfo.cs
- DataKeyArray.cs
- Image.cs
- UInt32Storage.cs
- DelayedRegex.cs
- CompensatableTransactionScopeActivityDesigner.cs
- SqlTrackingWorkflowInstance.cs
- Hex.cs
- HideDisabledControlAdapter.cs
- StringStorage.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- Stylesheet.cs
- XPathConvert.cs
- SqlFactory.cs
- UriTemplateVariablePathSegment.cs
- EnumValidator.cs
- DataGridViewRowPostPaintEventArgs.cs
- DesignTimeVisibleAttribute.cs
- IdleTimeoutMonitor.cs
- XmlSchemaInfo.cs
- MenuItemAutomationPeer.cs
- DataGridViewLinkCell.cs
- ConfigurationManagerInternal.cs
- RegistryKey.cs
- InlineCollection.cs
- Soap.cs
- FastEncoderStatics.cs
- DataSourceControlBuilder.cs
- ListView.cs
- BindingCompleteEventArgs.cs
- AttributeEmitter.cs
- TimeSpanSecondsConverter.cs
- UpdateCompiler.cs
- SectionRecord.cs
- MethodBuilderInstantiation.cs
- TableLayoutSettingsTypeConverter.cs
- NGCPageContentCollectionSerializerAsync.cs
- CodeDomExtensionMethods.cs
- MimeTypeMapper.cs
- WebBrowserBase.cs
- SharedStatics.cs
- VersionPair.cs
- DataMemberListEditor.cs
- ObjectConverter.cs
- ErrorWrapper.cs
- TabControlToolboxItem.cs
- DayRenderEvent.cs
- DataGridViewLayoutData.cs
- PatternMatcher.cs
- PopOutPanel.cs
- LinkedResource.cs
- SoapMessage.cs
- JsonReader.cs
- ViewUtilities.cs
- PassportAuthenticationEventArgs.cs
- DataGridLength.cs
- AdPostCacheSubstitution.cs
- OdbcHandle.cs
- ServiceModelInstallComponent.cs
- OdbcConnectionFactory.cs