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
- LoginUtil.cs
- CodeDirectionExpression.cs
- LinkArea.cs
- HttpMethodAttribute.cs
- ProtocolsConfigurationEntry.cs
- ProxyWebPartManager.cs
- OrderedEnumerableRowCollection.cs
- URL.cs
- ParentUndoUnit.cs
- InvalidOperationException.cs
- DataGridTableCollection.cs
- XmlIterators.cs
- SmtpCommands.cs
- FormViewRow.cs
- ObjectComplexPropertyMapping.cs
- TabItemAutomationPeer.cs
- SelectionHighlightInfo.cs
- SerializerDescriptor.cs
- SqlDataSourceView.cs
- CompilerResults.cs
- ApplyImportsAction.cs
- NullRuntimeConfig.cs
- TemplateControl.cs
- SqlAggregateChecker.cs
- SqlUnionizer.cs
- ObjectDisposedException.cs
- ServiceOperationWrapper.cs
- HyperLinkColumn.cs
- PermissionAttributes.cs
- TagMapInfo.cs
- XmlMtomReader.cs
- StrongNameKeyPair.cs
- DockProviderWrapper.cs
- SystemFonts.cs
- SqlTopReducer.cs
- ServicesUtilities.cs
- RootBrowserWindowProxy.cs
- AssociationEndMember.cs
- SessionPageStateSection.cs
- PlatformNotSupportedException.cs
- XmlQueryTypeFactory.cs
- XmlMapping.cs
- Matrix.cs
- XPathScanner.cs
- XmlWhitespace.cs
- HMACRIPEMD160.cs
- _NegotiateClient.cs
- HostedTransportConfigurationManager.cs
- RemotingException.cs
- Transform.cs
- SmiConnection.cs
- coordinatorscratchpad.cs
- EnumerableRowCollectionExtensions.cs
- BufferModesCollection.cs
- PenThread.cs
- EntityDataSourceWrapperCollection.cs
- RelationshipFixer.cs
- DesignBindingPropertyDescriptor.cs
- DownloadProgressEventArgs.cs
- LogSwitch.cs
- TokenizerHelper.cs
- DataGridViewLinkColumn.cs
- RequestResponse.cs
- SqlDataSourceView.cs
- OdbcReferenceCollection.cs
- webbrowsersite.cs
- DataTableReader.cs
- TraceUtility.cs
- DataServiceHost.cs
- Transform3DGroup.cs
- PrintPreviewControl.cs
- Compiler.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ContextProperty.cs
- BaseConfigurationRecord.cs
- HtmlDocument.cs
- ListGeneralPage.cs
- DBDataPermissionAttribute.cs
- HtmlTitle.cs
- IPAddressCollection.cs
- ThreadStartException.cs
- TypeUsageBuilder.cs
- TerminatorSinks.cs
- TargetParameterCountException.cs
- File.cs
- DataGridViewColumnHeaderCell.cs
- SocketStream.cs
- InstanceNotReadyException.cs
- ResourceReader.cs
- ApplicationId.cs
- SqlProviderManifest.cs
- CryptographicAttribute.cs
- TcpPortSharing.cs
- InternalCache.cs
- XmlSchemaSimpleContentRestriction.cs
- Error.cs
- CompiledQuery.cs
- XPathNodeIterator.cs
- OperationContextScope.cs
- TypeListConverter.cs