Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FocusTracker.cs
- COM2IDispatchConverter.cs
- URIFormatException.cs
- Array.cs
- Int64Converter.cs
- RuntimeVariableList.cs
- RuleProcessor.cs
- PopupRoot.cs
- OleDbRowUpdatedEvent.cs
- BinHexDecoder.cs
- FunctionDetailsReader.cs
- CommandEventArgs.cs
- Guid.cs
- WorkflowOwnerAsyncResult.cs
- ImageListStreamer.cs
- BindingNavigator.cs
- TrackBarRenderer.cs
- HtmlControl.cs
- ProfileProvider.cs
- XhtmlConformanceSection.cs
- MimeMapping.cs
- xmlNames.cs
- MLangCodePageEncoding.cs
- SqlException.cs
- LayoutDump.cs
- CompiledXpathExpr.cs
- AccessDataSourceView.cs
- AnnotationElement.cs
- ScriptResourceHandler.cs
- ArgumentOutOfRangeException.cs
- ApplyTemplatesAction.cs
- ConfigurationPermission.cs
- MultiAsyncResult.cs
- SessionStateUtil.cs
- DropShadowBitmapEffect.cs
- ExceptionUtil.cs
- WindowsListViewItem.cs
- SQLDateTime.cs
- TextServicesLoader.cs
- CryptoKeySecurity.cs
- EntityDataSourceWrapperCollection.cs
- RemotingAttributes.cs
- QilNode.cs
- ScriptResourceMapping.cs
- TypeElement.cs
- Duration.cs
- SecureStringHasher.cs
- PointHitTestParameters.cs
- WebInvokeAttribute.cs
- ConstraintEnumerator.cs
- DataList.cs
- PreservationFileReader.cs
- PeerResolverMode.cs
- TemplateEditingFrame.cs
- TdsEnums.cs
- PageStatePersister.cs
- BamlRecordWriter.cs
- BookmarkList.cs
- WebHttpBehavior.cs
- WithStatement.cs
- baseaxisquery.cs
- WebServicesInteroperability.cs
- ChangeTracker.cs
- XPathNavigatorException.cs
- MenuItemStyle.cs
- NetDispatcherFaultException.cs
- ObjectViewFactory.cs
- CodeGenerator.cs
- EventTrigger.cs
- DataTableReaderListener.cs
- ReceiveContent.cs
- SafeCryptoHandles.cs
- DefaultSection.cs
- _SingleItemRequestCache.cs
- HostUtils.cs
- FacetDescriptionElement.cs
- BlobPersonalizationState.cs
- ThreadPoolTaskScheduler.cs
- ApplicationInfo.cs
- ComPlusServiceHost.cs
- ProviderIncompatibleException.cs
- StrongNameHelpers.cs
- WorkflowApplicationException.cs
- ListItem.cs
- UnitySerializationHolder.cs
- Binding.cs
- TypeBrowserDialog.cs
- TagPrefixInfo.cs
- WebPartTransformerCollection.cs
- InvokeMethod.cs
- TemplateControlParser.cs
- Geometry.cs
- WindowsTreeView.cs
- FileSecurity.cs
- InfiniteIntConverter.cs
- WeakHashtable.cs
- AdPostCacheSubstitution.cs
- WhitespaceReader.cs
- LoginName.cs
- PathData.cs