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
- PrintingPermission.cs
- SkipQueryOptionExpression.cs
- VisualBrush.cs
- XPathDocument.cs
- GenerateScriptTypeAttribute.cs
- System.Data_BID.cs
- DataGridViewTextBoxEditingControl.cs
- MessageDecoder.cs
- MatrixCamera.cs
- DataReaderContainer.cs
- ProcessModelInfo.cs
- FontStyle.cs
- ResourceWriter.cs
- PrintPageEvent.cs
- ToggleButtonAutomationPeer.cs
- BuildManager.cs
- UnsignedPublishLicense.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- WindowsButton.cs
- Positioning.cs
- ConfigurationManagerInternal.cs
- ParserContext.cs
- Policy.cs
- CorrelationManager.cs
- FileSystemInfo.cs
- TextTreePropertyUndoUnit.cs
- SingleAnimationUsingKeyFrames.cs
- DataTableMapping.cs
- DataServiceRequestOfT.cs
- CodeMemberProperty.cs
- TabletCollection.cs
- Logging.cs
- StyleBamlRecordReader.cs
- MarginCollapsingState.cs
- MergeFilterQuery.cs
- EdmProviderManifest.cs
- NumberFormatInfo.cs
- XmlCollation.cs
- OleDbPermission.cs
- Context.cs
- recordstate.cs
- CompositionDesigner.cs
- ObjectStorage.cs
- WithParamAction.cs
- hwndwrapper.cs
- WebEventTraceProvider.cs
- TimelineClockCollection.cs
- ParallelQuery.cs
- EntityModelBuildProvider.cs
- AuthenticationService.cs
- TabControl.cs
- Convert.cs
- PipelineModuleStepContainer.cs
- ConnectionConsumerAttribute.cs
- CorrelationManager.cs
- AppSettingsExpressionBuilder.cs
- TrackingWorkflowEventArgs.cs
- WorkflowClientDeliverMessageWrapper.cs
- SeekStoryboard.cs
- DataPagerFieldCommandEventArgs.cs
- Decimal.cs
- StateWorkerRequest.cs
- UnsafeNativeMethods.cs
- ContextMenuStripActionList.cs
- Trace.cs
- XmlComplianceUtil.cs
- XamlClipboardData.cs
- RoutedEventHandlerInfo.cs
- IsolatedStoragePermission.cs
- Graph.cs
- WorkflowValidationFailedException.cs
- PresentationSource.cs
- ObjectManager.cs
- AccessDataSourceView.cs
- TransformProviderWrapper.cs
- VectorAnimation.cs
- DataGridViewTextBoxEditingControl.cs
- PostBackOptions.cs
- TypeLoader.cs
- CodeAttributeArgument.cs
- log.cs
- EtwTrackingBehaviorElement.cs
- InvokeHandlers.cs
- XmlSerializerFactory.cs
- OdbcErrorCollection.cs
- PointLightBase.cs
- ScriptModule.cs
- PrimaryKeyTypeConverter.cs
- DrawingContextWalker.cs
- TextDecorationCollection.cs
- Attributes.cs
- ContainerParaClient.cs
- XmlSchemaInfo.cs
- SimpleType.cs
- ErrorWebPart.cs
- FileVersionInfo.cs
- WinEventWrap.cs
- FontStretch.cs
- XamlGridLengthSerializer.cs
- DesignerCategoryAttribute.cs