Code:
/ DotNET / DotNET / 8.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
- CodeIdentifiers.cs
- BitmapFrameEncode.cs
- ProcessModelSection.cs
- XmlSchemaSimpleType.cs
- PartialCachingControl.cs
- Predicate.cs
- ContextMenuService.cs
- CompositeFontInfo.cs
- PtsHost.cs
- ParameterToken.cs
- HandlerMappingMemo.cs
- CookieProtection.cs
- CriticalFinalizerObject.cs
- LicenseContext.cs
- ObjectHandle.cs
- LazyTextWriterCreator.cs
- RequestUriProcessor.cs
- ProfilePropertySettingsCollection.cs
- ScriptingJsonSerializationSection.cs
- TrackingServices.cs
- FtpRequestCacheValidator.cs
- WindowsAuthenticationEventArgs.cs
- PassportIdentity.cs
- WrapPanel.cs
- XamlRtfConverter.cs
- SQLMembershipProvider.cs
- PropertyItem.cs
- ReachDocumentPageSerializer.cs
- HostSecurityManager.cs
- Helper.cs
- SecurityContext.cs
- ExpressionVisitor.cs
- CustomActivityDesigner.cs
- ItemChangedEventArgs.cs
- MessageFormatterConverter.cs
- ListItemsCollectionEditor.cs
- InsufficientMemoryException.cs
- WebEvents.cs
- XmlWriterTraceListener.cs
- StandardOleMarshalObject.cs
- WindowsListViewScroll.cs
- ListItemCollection.cs
- AQNBuilder.cs
- PrefixHandle.cs
- TranslateTransform3D.cs
- NetworkInterface.cs
- RoutedUICommand.cs
- CodeLinePragma.cs
- ColumnMapVisitor.cs
- EntityDataSourceDataSelectionPanel.cs
- SamlAttributeStatement.cs
- _NTAuthentication.cs
- PhysicalAddress.cs
- ValidationError.cs
- Attributes.cs
- WebConfigurationHostFileChange.cs
- CuspData.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ResourceReferenceExpression.cs
- _SslStream.cs
- ParserStreamGeometryContext.cs
- CodeGenerationManager.cs
- WebUtil.cs
- WinFormsUtils.cs
- CodeArrayCreateExpression.cs
- PlatformCulture.cs
- ProcessProtocolHandler.cs
- XmlSchemaFacet.cs
- DiscreteKeyFrames.cs
- XmlTextReaderImpl.cs
- TypedColumnHandler.cs
- GridViewColumnCollection.cs
- ImmComposition.cs
- PagesSection.cs
- TextParaClient.cs
- SqlWebEventProvider.cs
- RenderingBiasValidation.cs
- FontConverter.cs
- FixedSOMElement.cs
- IdnElement.cs
- Gdiplus.cs
- DoubleAnimationClockResource.cs
- UserPreferenceChangingEventArgs.cs
- TdsParserSafeHandles.cs
- SchemaComplexType.cs
- FontUnit.cs
- WorkflowServiceHost.cs
- ValidatorCollection.cs
- FixedSchema.cs
- TextPointer.cs
- ValidationPropertyAttribute.cs
- EFDataModelProvider.cs
- InvalidProgramException.cs
- TextReader.cs
- TextSpan.cs
- SqlWriter.cs
- PreviewPrintController.cs
- OracleSqlParser.cs
- StylusButton.cs
- XmlComplianceUtil.cs