Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / BaseCollection.cs / 1 / 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.
///
#if WINFSInternalOnly
internal
#else
public
#endif
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpCacheParams.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- Vector3DAnimationUsingKeyFrames.cs
- DistinctQueryOperator.cs
- AssemblyBuilderData.cs
- PerformanceCounterPermissionEntry.cs
- ContentIterators.cs
- GeneralTransform.cs
- SerializationHelper.cs
- FlowPosition.cs
- MetadataCollection.cs
- OpenTypeLayoutCache.cs
- CharacterHit.cs
- QilInvokeLateBound.cs
- ClipboardProcessor.cs
- PenThreadPool.cs
- SqlDataAdapter.cs
- ImageKeyConverter.cs
- ColumnCollection.cs
- AuthenticationModeHelper.cs
- GeneralTransform3DTo2D.cs
- GenericQueueSurrogate.cs
- SqlException.cs
- ObjectStorage.cs
- Block.cs
- StrongNameIdentityPermission.cs
- EnumValidator.cs
- ObjectPersistData.cs
- FloaterBaseParagraph.cs
- DataSvcMapFile.cs
- FontSizeConverter.cs
- HostingEnvironmentException.cs
- HealthMonitoringSection.cs
- DataContractAttribute.cs
- ConsoleKeyInfo.cs
- CellRelation.cs
- StrokeIntersection.cs
- DataGridViewCellStyleChangedEventArgs.cs
- TableCell.cs
- CodeDefaultValueExpression.cs
- StrokeCollectionDefaultValueFactory.cs
- ContentTextAutomationPeer.cs
- SByte.cs
- SplitterEvent.cs
- InvalidDataException.cs
- IntranetCredentialPolicy.cs
- OrderPreservingMergeHelper.cs
- ClockGroup.cs
- DesignerResources.cs
- SyntaxCheck.cs
- CompModHelpers.cs
- ConfigXmlReader.cs
- BuildProviderCollection.cs
- RepeaterItemEventArgs.cs
- HostingEnvironment.cs
- LogSwitch.cs
- ExpressionBindings.cs
- ComponentRenameEvent.cs
- RequestCacheValidator.cs
- UIElement.cs
- WindowsListViewGroupSubsetLink.cs
- MultiTargetingUtil.cs
- ConditionalAttribute.cs
- ForceCopyBuildProvider.cs
- ServiceNameElement.cs
- DataColumnChangeEvent.cs
- QueryContinueDragEventArgs.cs
- XmlnsCache.cs
- LogicalExpressionEditor.cs
- OleDbStruct.cs
- XsltInput.cs
- SchemaImporter.cs
- StateMachineSubscriptionManager.cs
- DecoderBestFitFallback.cs
- HtmlImage.cs
- BoundColumn.cs
- MailWriter.cs
- CompilationUnit.cs
- Size3D.cs
- DBSqlParserTableCollection.cs
- SoapElementAttribute.cs
- IntSecurity.cs
- StackOverflowException.cs
- X509Extension.cs
- Converter.cs
- RequestTimeoutManager.cs
- Set.cs
- TraceSwitch.cs
- SortedList.cs
- PropertyCondition.cs
- ListChangedEventArgs.cs
- WindowHelperService.cs
- FactorySettingsElement.cs
- CannotUnloadAppDomainException.cs
- DefaultAutoFieldGenerator.cs
- NamespaceQuery.cs
- XomlCompilerParameters.cs
- VirtualDirectoryMapping.cs
- LayeredChannelFactory.cs
- OutputCacheSettingsSection.cs