Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; ////// #if WINFSInternalOnly internal #else public #endif class InternalDataCollectionBase : ICollection { internal static CollectionChangeEventArgs RefreshEventArgs = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null); //================================================== // the ICollection methods //================================================== ///Provides the base functionality for creating collections. ////// [ 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. //------------------------------------------------------------------------------ //Gets the total number of elements in a collection. ///// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections; using System.ComponentModel; using System.Globalization; ////// #if WINFSInternalOnly internal #else public #endif class InternalDataCollectionBase : ICollection { internal static CollectionChangeEventArgs RefreshEventArgs = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null); //================================================== // the ICollection methods //================================================== ///Provides the base functionality for creating collections. ////// [ 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.Gets the total number of elements in a collection. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyProperty.cs
- CollectionBuilder.cs
- ServerIdentity.cs
- AuthenticationModuleElement.cs
- FormsAuthenticationUserCollection.cs
- DrawTreeNodeEventArgs.cs
- DropShadowEffect.cs
- LocatorManager.cs
- EventToken.cs
- SqlBuffer.cs
- MetadataProperty.cs
- ServiceModelDictionary.cs
- OuterGlowBitmapEffect.cs
- SqlComparer.cs
- PerfCounters.cs
- SetterBase.cs
- SrgsRuleRef.cs
- CommandBindingCollection.cs
- ShaderEffect.cs
- IDQuery.cs
- URLMembershipCondition.cs
- altserialization.cs
- AssemblyAssociatedContentFileAttribute.cs
- XmlEntityReference.cs
- PageThemeCodeDomTreeGenerator.cs
- ProcessHostMapPath.cs
- SecurityState.cs
- MarkupExtensionReturnTypeAttribute.cs
- Int32Rect.cs
- cookie.cs
- BitmapEffectInput.cs
- EntityTransaction.cs
- RedirectionProxy.cs
- Bits.cs
- DataColumn.cs
- NoneExcludedImageIndexConverter.cs
- _AcceptOverlappedAsyncResult.cs
- XPathNodeInfoAtom.cs
- Light.cs
- BridgeDataRecord.cs
- StrokeSerializer.cs
- UnmanagedBitmapWrapper.cs
- EndpointDesigner.cs
- ObjectHandle.cs
- TableItemStyle.cs
- ErrorTableItemStyle.cs
- InlineUIContainer.cs
- InternalsVisibleToAttribute.cs
- SwitchCase.cs
- DateTimeSerializationSection.cs
- ListBase.cs
- TimerExtension.cs
- Underline.cs
- ScriptReference.cs
- DeclarativeCatalogPart.cs
- SqlTypesSchemaImporter.cs
- CheckBoxPopupAdapter.cs
- BasicCommandTreeVisitor.cs
- InertiaTranslationBehavior.cs
- WindowsToolbar.cs
- VariableAction.cs
- AllMembershipCondition.cs
- JavascriptXmlWriterWrapper.cs
- ZipIOExtraFieldPaddingElement.cs
- TextSelectionHelper.cs
- initElementDictionary.cs
- ServiceProviders.cs
- InputLanguageManager.cs
- SecurityManager.cs
- IgnoreFileBuildProvider.cs
- SQLMoneyStorage.cs
- Encoding.cs
- BaseParser.cs
- DelegatingTypeDescriptionProvider.cs
- WebPartActionVerb.cs
- Utils.cs
- SqlBuffer.cs
- HandlerBase.cs
- DataTableMappingCollection.cs
- ViewGenerator.cs
- SmiTypedGetterSetter.cs
- Predicate.cs
- ColumnMap.cs
- cache.cs
- CallbackValidator.cs
- RegexParser.cs
- InteropAutomationProvider.cs
- MessageQueueKey.cs
- IPEndPoint.cs
- xdrvalidator.cs
- WebPartAddingEventArgs.cs
- UniqueContractNameValidationBehavior.cs
- DbParameterHelper.cs
- FontStretches.cs
- ManagedIStream.cs
- SqlNode.cs
- MemberPath.cs
- WebPartConnectionsConnectVerb.cs
- MessageSmuggler.cs
- MonitoringDescriptionAttribute.cs