Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / SchemaElementLookUpTableEnumerator.cs / 1 / SchemaElementLookUpTableEnumerator.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics; namespace System.Data.EntityModel.SchemaObjectModel { ////// Summary description for SchemaElementLookUpTableEnumerator. /// internal sealed class SchemaElementLookUpTableEnumerator: IEnumerator where T : S where S : SchemaElement { #region Instance Fields private Dictionary _data = null; private List .Enumerator _enumerator; #endregion #region Public Methods /// /// /// /// /// public SchemaElementLookUpTableEnumerator(Dictionarydata,List keysInOrder) { Debug.Assert(data != null, "data parameter is null"); Debug.Assert(keysInOrder != null, "keysInOrder parameter is null"); _data = data; _enumerator = keysInOrder.GetEnumerator(); } #endregion #region IEnumerator Members /// /// /// public void Reset() { // it is implemented explicitly ((IEnumerator)_enumerator).Reset(); } ////// /// public T Current { get { string key = _enumerator.Current; return _data[key] as T; } } object System.Collections.IEnumerator.Current { get { string key = _enumerator.Current; return _data[key] as T; } } ////// /// ///public bool MoveNext() { while ( _enumerator.MoveNext() ) { if ( Current != null ) return true; } return false; } #endregion #region IDisposable Members /// /// /// public void Dispose() { } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics; namespace System.Data.EntityModel.SchemaObjectModel { ////// Summary description for SchemaElementLookUpTableEnumerator. /// internal sealed class SchemaElementLookUpTableEnumerator: IEnumerator where T : S where S : SchemaElement { #region Instance Fields private Dictionary _data = null; private List .Enumerator _enumerator; #endregion #region Public Methods /// /// /// /// /// public SchemaElementLookUpTableEnumerator(Dictionarydata,List keysInOrder) { Debug.Assert(data != null, "data parameter is null"); Debug.Assert(keysInOrder != null, "keysInOrder parameter is null"); _data = data; _enumerator = keysInOrder.GetEnumerator(); } #endregion #region IEnumerator Members /// /// /// public void Reset() { // it is implemented explicitly ((IEnumerator)_enumerator).Reset(); } ////// /// public T Current { get { string key = _enumerator.Current; return _data[key] as T; } } object System.Collections.IEnumerator.Current { get { string key = _enumerator.Current; return _data[key] as T; } } ////// /// ///public bool MoveNext() { while ( _enumerator.MoveNext() ) { if ( Current != null ) return true; } return false; } #endregion #region IDisposable Members /// /// /// public void Dispose() { } #endregion } } // 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
- _Events.cs
- Opcode.cs
- FileAuthorizationModule.cs
- TypeConverterHelper.cs
- ObjectToIdCache.cs
- RangeBaseAutomationPeer.cs
- TriState.cs
- DbgUtil.cs
- WindowsTokenRoleProvider.cs
- TemplateXamlParser.cs
- ZipFileInfoCollection.cs
- InheritedPropertyDescriptor.cs
- ListSurrogate.cs
- AssemblyFilter.cs
- DynamicILGenerator.cs
- TabPanel.cs
- PointLight.cs
- TreeViewItem.cs
- XmlChoiceIdentifierAttribute.cs
- DeflateStream.cs
- ErrorCodes.cs
- GridViewDesigner.cs
- Schema.cs
- XmlLinkedNode.cs
- XmlNavigatorStack.cs
- ColorAnimationUsingKeyFrames.cs
- PrintPreviewDialog.cs
- EditBehavior.cs
- IncrementalHitTester.cs
- PriorityBinding.cs
- XPathDocumentIterator.cs
- SecurityPermission.cs
- wgx_commands.cs
- FrameworkElementFactory.cs
- TransactionScope.cs
- ApplicationException.cs
- SchemaComplexType.cs
- XmlDocumentSerializer.cs
- ChannelCacheDefaults.cs
- DynamicRenderer.cs
- WindowsScrollBarBits.cs
- IntSecurity.cs
- IPAddressCollection.cs
- SortKey.cs
- ControllableStoryboardAction.cs
- VisualBasicExpressionConverter.cs
- ValidationError.cs
- TrimSurroundingWhitespaceAttribute.cs
- DesignerCategoryAttribute.cs
- SoapAttributes.cs
- CatalogZone.cs
- CoTaskMemHandle.cs
- ReflectionPermission.cs
- Attributes.cs
- RuntimeConfigLKG.cs
- SingleKeyFrameCollection.cs
- DataContractAttribute.cs
- URLAttribute.cs
- SendActivityDesignerTheme.cs
- RadioButtonList.cs
- __TransparentProxy.cs
- OleDbParameter.cs
- DataBoundControlHelper.cs
- SqlDependencyUtils.cs
- ThousandthOfEmRealPoints.cs
- DelegatingTypeDescriptionProvider.cs
- HttpWrapper.cs
- SystemFonts.cs
- XmlSchemaSimpleContent.cs
- FixedSOMPage.cs
- SettingsAttributes.cs
- Baml2006ReaderFrame.cs
- OleDbRowUpdatedEvent.cs
- DbModificationClause.cs
- CommentEmitter.cs
- ChannelDemuxer.cs
- HyperLink.cs
- Triplet.cs
- TransformGroup.cs
- SocketPermission.cs
- ProgressBarBrushConverter.cs
- SubMenuStyle.cs
- ServiceControllerDesigner.cs
- FixedFlowMap.cs
- XamlHostingSectionGroup.cs
- AssertFilter.cs
- ReverseInheritProperty.cs
- TextStore.cs
- CharAnimationBase.cs
- Graphics.cs
- XmlnsDictionary.cs
- MessageQueueTransaction.cs
- StrokeNodeOperations.cs
- AdornerLayer.cs
- RegexEditorDialog.cs
- QueryResponse.cs
- SoapWriter.cs
- RowParagraph.cs
- CompositeCollection.cs
- ChangeNode.cs