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
- BoolLiteral.cs
- Simplifier.cs
- Separator.cs
- SByteStorage.cs
- RepeaterItemEventArgs.cs
- WmlListAdapter.cs
- WebBrowserContainer.cs
- Bits.cs
- BufferedWebEventProvider.cs
- HasRunnableWorkflowEvent.cs
- LostFocusEventManager.cs
- DataGridRelationshipRow.cs
- ContainerActivationHelper.cs
- FastPropertyAccessor.cs
- CodeDefaultValueExpression.cs
- NonSerializedAttribute.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- Encoder.cs
- SourceFileBuildProvider.cs
- TextDecorationCollection.cs
- DataGridColumnHeader.cs
- TdsParserStateObject.cs
- DataGridViewRowsAddedEventArgs.cs
- SudsWriter.cs
- SymbolTable.cs
- SessionMode.cs
- ResourceContainer.cs
- ServiceNameElement.cs
- MaskedTextProvider.cs
- FontFamily.cs
- GCHandleCookieTable.cs
- ThreadAttributes.cs
- LogicalExpr.cs
- CodeAssignStatement.cs
- Rect3D.cs
- HotSpotCollection.cs
- WebPartZone.cs
- RefreshEventArgs.cs
- StringFreezingAttribute.cs
- ClientType.cs
- DictionaryManager.cs
- SecurityIdentifierElement.cs
- CapabilitiesUse.cs
- DataGridViewCellCancelEventArgs.cs
- WebPartEventArgs.cs
- TableLayoutCellPaintEventArgs.cs
- DataKey.cs
- DataListItem.cs
- VariableBinder.cs
- PopupControlService.cs
- DockPattern.cs
- WrapperEqualityComparer.cs
- SerializationInfoEnumerator.cs
- ServiceHostingEnvironment.cs
- AtomMaterializerLog.cs
- TextBoxBase.cs
- TablePattern.cs
- DataGridViewDataConnection.cs
- SeekStoryboard.cs
- EntryWrittenEventArgs.cs
- OpenTypeCommon.cs
- ReferencedAssembly.cs
- DataBinder.cs
- StorageEntityTypeMapping.cs
- X509ChainPolicy.cs
- XmlQualifiedNameTest.cs
- LinearGradientBrush.cs
- MulticastDelegate.cs
- Util.cs
- DataGridViewCheckBoxColumn.cs
- LicenseProviderAttribute.cs
- PostBackOptions.cs
- DPTypeDescriptorContext.cs
- TreeNode.cs
- ResourceCategoryAttribute.cs
- GeneralTransform2DTo3D.cs
- RemoteWebConfigurationHost.cs
- HostSecurityManager.cs
- GeometryDrawing.cs
- StreamGeometryContext.cs
- TextRange.cs
- ConditionCollection.cs
- ModelItemDictionaryImpl.cs
- VectorAnimationBase.cs
- PasswordTextContainer.cs
- WebPart.cs
- FixedSOMLineRanges.cs
- ViewLoader.cs
- DataGridViewRowPostPaintEventArgs.cs
- MinimizableAttributeTypeConverter.cs
- XmlSchemaDocumentation.cs
- ModelChangedEventArgsImpl.cs
- hwndwrapper.cs
- PermissionSet.cs
- XmlDataSourceDesigner.cs
- tibetanshape.cs
- CompilationUtil.cs
- VisualCollection.cs
- CompilerState.cs
- NetworkInformationException.cs