Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / SchemaElementLookUpTableEnumerator.cs / 1305376 / 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
- XmlNamespaceManager.cs
- ReceiveDesigner.xaml.cs
- SemanticBasicElement.cs
- XmlDataSourceView.cs
- RefreshEventArgs.cs
- PermissionAttributes.cs
- DiagnosticsElement.cs
- PointAnimationClockResource.cs
- OutArgument.cs
- _SSPIWrapper.cs
- MetadataItemEmitter.cs
- RoutedCommand.cs
- StoreItemCollection.cs
- Activity.cs
- CustomWebEventKey.cs
- DelegatingHeader.cs
- QilGeneratorEnv.cs
- OutputCacheSettings.cs
- ResourcePart.cs
- Splitter.cs
- CompositionTarget.cs
- TableStyle.cs
- SqlUtils.cs
- QuaternionAnimation.cs
- IndexedString.cs
- DeferredBinaryDeserializerExtension.cs
- Enlistment.cs
- Int16Storage.cs
- SoapSchemaImporter.cs
- CatalogUtil.cs
- Models.cs
- HttpException.cs
- EncryptedData.cs
- TextParaLineResult.cs
- SplineKeyFrames.cs
- PackWebRequestFactory.cs
- ProgressBarAutomationPeer.cs
- DetailsView.cs
- SkipQueryOptionExpression.cs
- SyntaxCheck.cs
- _AuthenticationState.cs
- KeyValueInternalCollection.cs
- ActivityDesignerHelper.cs
- MinMaxParagraphWidth.cs
- QueueProcessor.cs
- ObjectStateEntry.cs
- PriorityQueue.cs
- nulltextnavigator.cs
- FormatStringEditor.cs
- ImplicitInputBrush.cs
- BuildProviderCollection.cs
- SynchronousSendBindingElement.cs
- TextServicesLoader.cs
- EmptyImpersonationContext.cs
- Font.cs
- TimelineGroup.cs
- FixedPageProcessor.cs
- SqlNotificationRequest.cs
- BypassElementCollection.cs
- TextPattern.cs
- DataTableNewRowEvent.cs
- WmiInstallComponent.cs
- NavigationHelper.cs
- ValueConversionAttribute.cs
- ApplicationDirectoryMembershipCondition.cs
- RowsCopiedEventArgs.cs
- Separator.cs
- DirectionalLight.cs
- IteratorFilter.cs
- OdbcRowUpdatingEvent.cs
- FloaterParaClient.cs
- QilStrConcatenator.cs
- DefaultTextStoreTextComposition.cs
- TimelineClockCollection.cs
- TextBoxAutomationPeer.cs
- MostlySingletonList.cs
- LocalBuilder.cs
- DocumentOrderQuery.cs
- SQLRoleProvider.cs
- RequestCachePolicy.cs
- ProcessMessagesAsyncResult.cs
- CodeDirectoryCompiler.cs
- PathFigure.cs
- DataSourceXmlClassAttribute.cs
- ListItemViewControl.cs
- SettingsSavedEventArgs.cs
- QualifiedCellIdBoolean.cs
- RegexCompiler.cs
- LocalValueEnumerator.cs
- XmlSchemaSearchPattern.cs
- Image.cs
- OracleSqlParser.cs
- HttpFileCollection.cs
- Span.cs
- PipelineModuleStepContainer.cs
- DecimalMinMaxAggregationOperator.cs
- RijndaelCryptoServiceProvider.cs
- XPathParser.cs
- List.cs
- _OverlappedAsyncResult.cs