Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / BaseCollection.cs / 1305376 / BaseCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
// [....]
// [....]
//-----------------------------------------------------------------------------
namespace System.Data {
using System;
using System.Collections;
using System.ComponentModel;
using System.Globalization;
///
/// Provides the base functionality for creating collections.
///
public class InternalDataCollectionBase : ICollection {
internal static CollectionChangeEventArgs RefreshEventArgs = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null);
//==================================================
// the ICollection methods
//==================================================
///
/// Gets the total number of elements in a collection.
///
[
Browsable(false)
]
public virtual int Count {
get {
return List.Count;
}
}
public virtual void CopyTo(Array ar, int index) {
List.CopyTo(ar, index);
}
public virtual IEnumerator GetEnumerator() {
return List.GetEnumerator();
}
[
Browsable(false)
]
public bool IsReadOnly {
get {
return false;
}
}
[Browsable(false)]
public bool IsSynchronized {
get {
// so the user will know that it has to lock this object
return false;
}
}
// Return value:
// > 0 (1) : CaseSensitve equal
// < 0 (-1) : Case-Insensitive Equal
// = 0 : Not Equal
internal int NamesEqual(string s1, string s2, bool fCaseSensitive, CultureInfo locale) {
if (fCaseSensitive) {
if (String.Compare(s1, s2, false, locale) == 0)
return 1;
else
return 0;
}
// Case, kana and width -Insensitive compare
if (locale.CompareInfo.Compare(s1, s2,
CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth) == 0) {
if (String.Compare(s1, s2, false, locale) == 0)
return 1;
else
return -1;
}
return 0;
}
[Browsable(false)]
public object SyncRoot {
get {
return this;
}
}
protected virtual ArrayList List {
get {
return null;
}
}
}
}
// 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
- ZipIOCentralDirectoryFileHeader.cs
- View.cs
- Double.cs
- EnumerableRowCollection.cs
- X509AsymmetricSecurityKey.cs
- SqlTopReducer.cs
- CodeTypeReferenceExpression.cs
- CatalogPartChrome.cs
- ResponseStream.cs
- PreviousTrackingServiceAttribute.cs
- EmbossBitmapEffect.cs
- TextEffect.cs
- StatusStrip.cs
- DataGridViewElement.cs
- SelectionList.cs
- SinglePageViewer.cs
- CustomValidator.cs
- WarningException.cs
- MonthChangedEventArgs.cs
- BrowserCapabilitiesCodeGenerator.cs
- ResourceExpressionBuilder.cs
- Crc32.cs
- ZipIOCentralDirectoryFileHeader.cs
- TransferRequestHandler.cs
- SolidBrush.cs
- StorageMappingFragment.cs
- NativeMethods.cs
- NetworkInterface.cs
- ScaleTransform.cs
- ScrollEventArgs.cs
- RightsDocument.cs
- DelegateBodyWriter.cs
- OptimizedTemplateContent.cs
- PerformanceCounterManager.cs
- Effect.cs
- ActivationService.cs
- DbConnectionPoolGroupProviderInfo.cs
- CompilerScopeManager.cs
- ISAPIApplicationHost.cs
- IsolatedStorageFilePermission.cs
- TdsParserSafeHandles.cs
- NameValueSectionHandler.cs
- VersionValidator.cs
- SortKey.cs
- TextEncodedRawTextWriter.cs
- NumericPagerField.cs
- EventHandlingScope.cs
- ConnectionConsumerAttribute.cs
- Sequence.cs
- RSAOAEPKeyExchangeDeformatter.cs
- embossbitmapeffect.cs
- RequestQueryProcessor.cs
- StringFreezingAttribute.cs
- StoryFragments.cs
- DoubleAverageAggregationOperator.cs
- DbDeleteCommandTree.cs
- PieceDirectory.cs
- PropertyGridCommands.cs
- CodeComment.cs
- BitmapEffect.cs
- CompiledXpathExpr.cs
- ExpressionEditorAttribute.cs
- WindowsSpinner.cs
- ClassImporter.cs
- RangeContentEnumerator.cs
- UserNameServiceElement.cs
- Brush.cs
- OutArgumentConverter.cs
- WebPartPersonalization.cs
- DebugInfoGenerator.cs
- ExpressionBindings.cs
- DataServiceQueryContinuation.cs
- XmlLinkedNode.cs
- XmlNamedNodeMap.cs
- AsyncOperation.cs
- ComContractElementCollection.cs
- QilCloneVisitor.cs
- BitmapEffectDrawingContextWalker.cs
- LocalizationParserHooks.cs
- TextContainerChangeEventArgs.cs
- JoinSymbol.cs
- Vector3DCollectionConverter.cs
- BindStream.cs
- ByeOperation11AsyncResult.cs
- PeerInputChannelListener.cs
- TraceHandlerErrorFormatter.cs
- PrintPreviewGraphics.cs
- Parameter.cs
- QueryOptionExpression.cs
- SoapReflector.cs
- DecoderBestFitFallback.cs
- WebAdminConfigurationHelper.cs
- CircleHotSpot.cs
- MarkedHighlightComponent.cs
- SqlClientFactory.cs
- _ConnectionGroup.cs
- InplaceBitmapMetadataWriter.cs
- Ipv6Element.cs
- MatcherBuilder.cs
- SqlDesignerDataSourceView.cs