Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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);
}
}
}
// 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.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);
}
}
}
// 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
- ArgumentNullException.cs
- TextParagraphView.cs
- FlowchartStart.xaml.cs
- GridViewEditEventArgs.cs
- X509Extension.cs
- GPPOINT.cs
- TextRangeEdit.cs
- DataGridViewRowStateChangedEventArgs.cs
- GridItemProviderWrapper.cs
- Operator.cs
- DataServiceRequest.cs
- MsmqDecodeHelper.cs
- HostVisual.cs
- XamlStyleSerializer.cs
- Walker.cs
- DataPointer.cs
- PrintEvent.cs
- WebContext.cs
- recordstatefactory.cs
- ListViewSelectEventArgs.cs
- RecordManager.cs
- ObjectKeyFrameCollection.cs
- ByteStorage.cs
- WmpBitmapDecoder.cs
- EntityDataSourceChangedEventArgs.cs
- AgileSafeNativeMemoryHandle.cs
- SystemResourceHost.cs
- BamlWriter.cs
- WebSysDisplayNameAttribute.cs
- IconEditor.cs
- PersonalizableAttribute.cs
- TableCell.cs
- PathTooLongException.cs
- DefinitionUpdate.cs
- DataReaderContainer.cs
- EntityChangedParams.cs
- CheckBox.cs
- InkCanvasInnerCanvas.cs
- RowToParametersTransformer.cs
- SetStoryboardSpeedRatio.cs
- SqlUserDefinedTypeAttribute.cs
- SqlDataReaderSmi.cs
- StatusBarDrawItemEvent.cs
- DataBindEngine.cs
- DbParameterHelper.cs
- MULTI_QI.cs
- ProviderConnectionPointCollection.cs
- SmiEventSink.cs
- NumericUpDownAccelerationCollection.cs
- FolderBrowserDialog.cs
- GraphicsContainer.cs
- XmlCharCheckingWriter.cs
- MessageSecurityVersion.cs
- SamlAuthenticationClaimResource.cs
- SoapEnumAttribute.cs
- CmsInterop.cs
- SQLResource.cs
- DictionaryTraceRecord.cs
- SortableBindingList.cs
- ControlBuilder.cs
- securestring.cs
- WebPartCancelEventArgs.cs
- DateBoldEvent.cs
- LoginView.cs
- ByteStack.cs
- CompoundFileReference.cs
- DBBindings.cs
- TimerElapsedEvenArgs.cs
- ToolStripLabel.cs
- CodeTypeReference.cs
- SamlAuthorizationDecisionStatement.cs
- DataGrid.cs
- SafeNativeMethods.cs
- CompoundFileIOPermission.cs
- _IPv6Address.cs
- ConnectionConsumerAttribute.cs
- CalendarModeChangedEventArgs.cs
- SelectionHighlightInfo.cs
- CounterSample.cs
- DataTableNewRowEvent.cs
- EventToken.cs
- LoginNameDesigner.cs
- DefaultShape.cs
- DynamicRouteExpression.cs
- CalendarDay.cs
- TimeSpanFormat.cs
- COM2FontConverter.cs
- WebControlAdapter.cs
- XmlLanguageConverter.cs
- UmAlQuraCalendar.cs
- HttpResponseInternalBase.cs
- EntitySetBaseCollection.cs
- DataGridViewMethods.cs
- SecondaryIndexList.cs
- XmlTextAttribute.cs
- DesignerDataTable.cs
- HttpRawResponse.cs
- BitArray.cs
- ValidatingReaderNodeData.cs
- ProxyAttribute.cs