Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Services / Monitoring / system / Diagnosticts / InstanceDataCollectionCollection.cs / 1 / InstanceDataCollectionCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Diagnostics {
using System.Diagnostics;
using System;
using System.Collections;
using System.Globalization;
///
/// The collection returned from the method.
/// that contains all the counter and instance data.
/// The collection contains an InstanceDataCollection object for each counter. Each InstanceDataCollection
/// object contains the performance data for all counters for that instance. In other words the data is
/// indexed by counter name and then by instance name.
///
public class InstanceDataCollectionCollection : DictionaryBase {
[Obsolete("This constructor has been deprecated. Please use System.Diagnostics.PerformanceCounterCategory.ReadCategory() to get an instance of this collection instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public InstanceDataCollectionCollection() : base() {}
///
/// [To be supplied.]
///
public InstanceDataCollection this[string counterName] {
get {
if (counterName == null)
throw new ArgumentNullException("counterName");
object objectName = counterName.ToLower(CultureInfo.InvariantCulture);
return (InstanceDataCollection) Dictionary[objectName];
}
}
///
/// [To be supplied.]
///
public ICollection Keys {
get { return Dictionary.Keys; }
}
///
/// [To be supplied.]
///
public ICollection Values {
get {
return Dictionary.Values;
}
}
internal void Add(string counterName, InstanceDataCollection value) {
object objectName = counterName.ToLower(CultureInfo.InvariantCulture);
Dictionary.Add(objectName, value);
}
///
/// [To be supplied.]
///
public bool Contains(string counterName) {
if (counterName == null)
throw new ArgumentNullException("counterName");
object objectName = counterName.ToLower(CultureInfo.InvariantCulture);
return Dictionary.Contains(objectName);
}
///
/// [To be supplied.]
///
public void CopyTo(InstanceDataCollection[] counters, int index) {
Dictionary.Values.CopyTo((Array)counters, index);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PerformanceCountersElement.cs
- KeyEventArgs.cs
- CodeGen.cs
- XmlIgnoreAttribute.cs
- SoapInteropTypes.cs
- WindowsImpersonationContext.cs
- BaseValidator.cs
- DispatcherExceptionEventArgs.cs
- DbParameterCollection.cs
- GridViewDeleteEventArgs.cs
- ClientBuildManagerCallback.cs
- LogicalExpr.cs
- XXXOnTypeBuilderInstantiation.cs
- InternalCache.cs
- ClientApiGenerator.cs
- Expr.cs
- Point3DCollection.cs
- CatalogZoneDesigner.cs
- ObjectListTitleAttribute.cs
- FixedSOMFixedBlock.cs
- IsolatedStorageFilePermission.cs
- Component.cs
- WebPartUtil.cs
- BitmapEffect.cs
- MimeWriter.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- ObjectContext.cs
- EventsTab.cs
- RepeaterItemEventArgs.cs
- DetailsViewModeEventArgs.cs
- DetailsViewCommandEventArgs.cs
- WebPageTraceListener.cs
- SqlInternalConnectionSmi.cs
- ScrollChangedEventArgs.cs
- IpcChannelHelper.cs
- MenuCommandsChangedEventArgs.cs
- RefreshEventArgs.cs
- InsufficientExecutionStackException.cs
- SystemResourceKey.cs
- TextDecoration.cs
- ToolBarDesigner.cs
- SuppressMergeCheckAttribute.cs
- wgx_exports.cs
- Dump.cs
- Stacktrace.cs
- ImmutableClientRuntime.cs
- BufferBuilder.cs
- AttributedMetaModel.cs
- ApplicationInterop.cs
- SqlProvider.cs
- SecUtil.cs
- CapabilitiesState.cs
- PolyQuadraticBezierSegment.cs
- MediaPlayer.cs
- DbProviderFactoriesConfigurationHandler.cs
- HTMLTagNameToTypeMapper.cs
- EndOfStreamException.cs
- XmlSchemaIdentityConstraint.cs
- securitymgrsite.cs
- SchemaTypeEmitter.cs
- RootDesignerSerializerAttribute.cs
- Models.cs
- MyContact.cs
- unsafenativemethodstextservices.cs
- InternalEnumValidatorAttribute.cs
- CodeNamespaceCollection.cs
- XmlSchemaSimpleType.cs
- TemplateXamlTreeBuilder.cs
- SingleAnimationBase.cs
- SubMenuStyleCollection.cs
- IndentedWriter.cs
- ObjectCloneHelper.cs
- SemanticBasicElement.cs
- TextView.cs
- RecognitionEventArgs.cs
- Panel.cs
- PathGradientBrush.cs
- SqlError.cs
- XmlSchemaInferenceException.cs
- CodeExpressionStatement.cs
- XmlIlVisitor.cs
- FormViewPageEventArgs.cs
- FormViewPageEventArgs.cs
- SpecularMaterial.cs
- OleDbEnumerator.cs
- SpecialNameAttribute.cs
- AnnotationResourceCollection.cs
- Validator.cs
- ServiceDiscoveryElement.cs
- EncryptedKey.cs
- PropertyTab.cs
- HtmlInputImage.cs
- CharUnicodeInfo.cs
- AdRotatorDesigner.cs
- PauseStoryboard.cs
- XPathParser.cs
- ListView.cs
- sqlinternaltransaction.cs
- Translator.cs
- SqlLiftIndependentRowExpressions.cs