Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextBlock.cs
- NameScopePropertyAttribute.cs
- QueryCacheEntry.cs
- HttpApplication.cs
- GroupStyle.cs
- ResourceContainer.cs
- XmlLangPropertyAttribute.cs
- BlurBitmapEffect.cs
- FontDialog.cs
- SafeLibraryHandle.cs
- DrawingVisualDrawingContext.cs
- CommandEventArgs.cs
- ServiceOperation.cs
- TableChangeProcessor.cs
- HebrewCalendar.cs
- DbConnectionInternal.cs
- CompilerResults.cs
- AesManaged.cs
- AlphabetConverter.cs
- DataGridViewCellParsingEventArgs.cs
- HybridDictionary.cs
- UnsafeNativeMethods.cs
- XmlNamedNodeMap.cs
- TemplatePartAttribute.cs
- WindowsSysHeader.cs
- BitmapCacheBrush.cs
- ELinqQueryState.cs
- CookieParameter.cs
- TwoPhaseCommitProxy.cs
- FixedSOMTableRow.cs
- DataAdapter.cs
- PropVariant.cs
- FileFormatException.cs
- EmissiveMaterial.cs
- ColumnHeader.cs
- CapacityStreamGeometryContext.cs
- AutoResetEvent.cs
- PocoEntityKeyStrategy.cs
- MultiTargetingUtil.cs
- ValidateNames.cs
- DocumentViewer.cs
- HeaderUtility.cs
- HeaderedContentControl.cs
- DataServiceException.cs
- WCFServiceClientProxyGenerator.cs
- Function.cs
- CodeArrayIndexerExpression.cs
- DataGridViewAccessibleObject.cs
- ComplexBindingPropertiesAttribute.cs
- XmlFormatWriterGenerator.cs
- ObservableCollectionDefaultValueFactory.cs
- ValueQuery.cs
- HTMLTagNameToTypeMapper.cs
- WasHttpModulesInstallComponent.cs
- ModuleBuilderData.cs
- BamlRecords.cs
- WorkflowIdleElement.cs
- LogWriteRestartAreaAsyncResult.cs
- FileSystemInfo.cs
- CustomAttribute.cs
- XmlEventCache.cs
- StylusPointPropertyId.cs
- XmlSerializerAssemblyAttribute.cs
- WindowsFormsDesignerOptionService.cs
- PageStatePersister.cs
- MemberJoinTreeNode.cs
- SortQuery.cs
- SqlFlattener.cs
- AbstractSvcMapFileLoader.cs
- BatchParser.cs
- SelectingProviderEventArgs.cs
- TableRow.cs
- SymDocumentType.cs
- StreamWithDictionary.cs
- ActivityBindForm.cs
- Stacktrace.cs
- SetStoryboardSpeedRatio.cs
- GridViewDeleteEventArgs.cs
- SplineQuaternionKeyFrame.cs
- SRef.cs
- SqlClientFactory.cs
- EventProvider.cs
- DnsEndPoint.cs
- SynchronizedChannelCollection.cs
- Cast.cs
- DataServiceRequestException.cs
- HttpBrowserCapabilitiesBase.cs
- WmiEventSink.cs
- DataTemplateKey.cs
- TraceContext.cs
- IsolatedStoragePermission.cs
- GlobalizationAssembly.cs
- PhysicalAddress.cs
- RC2.cs
- MainMenu.cs
- EmitterCache.cs
- DynamicContractTypeBuilder.cs
- ComplexBindingPropertiesAttribute.cs
- ObjectListField.cs
- ContainsSearchOperator.cs