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
- CapabilitiesRule.cs
- VisualBrush.cs
- SoundPlayer.cs
- URLBuilder.cs
- Variable.cs
- cookiecollection.cs
- ObservableDictionary.cs
- ParentControlDesigner.cs
- VideoDrawing.cs
- DrawItemEvent.cs
- DataColumnMapping.cs
- QuotedPrintableStream.cs
- TempEnvironment.cs
- GridItem.cs
- UriTemplateMatchException.cs
- EditorAttributeInfo.cs
- WindowsScrollBar.cs
- StorageScalarPropertyMapping.cs
- FolderBrowserDialog.cs
- validation.cs
- SQLMoney.cs
- BypassElementCollection.cs
- Preprocessor.cs
- AsyncDataRequest.cs
- BitmapEncoder.cs
- ParameterSubsegment.cs
- SequentialUshortCollection.cs
- BezierSegment.cs
- ProxyWebPartManager.cs
- ServicePointManagerElement.cs
- SearchForVirtualItemEventArgs.cs
- LockCookie.cs
- DataGridViewComponentPropertyGridSite.cs
- FusionWrap.cs
- CompilerResults.cs
- DataSysAttribute.cs
- MtomMessageEncodingBindingElement.cs
- HttpListener.cs
- GiveFeedbackEventArgs.cs
- ScrollProperties.cs
- UnauthorizedAccessException.cs
- _RequestLifetimeSetter.cs
- SQLSingle.cs
- serverconfig.cs
- BrowserCapabilitiesCompiler.cs
- SimplePropertyEntry.cs
- FamilyMap.cs
- WebPartUtil.cs
- XmlSchema.cs
- Message.cs
- ConcurrentDictionary.cs
- LineProperties.cs
- OdbcStatementHandle.cs
- Matrix3D.cs
- KeyNotFoundException.cs
- DocumentXPathNavigator.cs
- StateMachineDesignerPaint.cs
- SmtpReplyReaderFactory.cs
- StorageMappingItemLoader.cs
- CacheSection.cs
- DBSchemaRow.cs
- KeyPullup.cs
- DataGridViewDataErrorEventArgs.cs
- NavigationWindowAutomationPeer.cs
- ValidationSummary.cs
- LogFlushAsyncResult.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- WebControl.cs
- DocumentPaginator.cs
- AnnotationResource.cs
- OperationParameterInfoCollection.cs
- FreezableCollection.cs
- PropertyGridEditorPart.cs
- CatalogZone.cs
- Ref.cs
- IODescriptionAttribute.cs
- ConnectionStringSettingsCollection.cs
- TargetControlTypeCache.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- IndentTextWriter.cs
- ReadOnlyHierarchicalDataSourceView.cs
- UiaCoreApi.cs
- NullableBoolConverter.cs
- AndMessageFilter.cs
- IsolatedStorageSecurityState.cs
- DataGridViewCellStyleConverter.cs
- ManagementObject.cs
- ImmutablePropertyDescriptorGridEntry.cs
- EmptyQuery.cs
- TextFormattingConverter.cs
- InstanceKeyCompleteException.cs
- StylusPlugin.cs
- FreeFormDragDropManager.cs
- BindingCollection.cs
- DataGridCell.cs
- DirectoryNotFoundException.cs
- PrintPageEvent.cs
- PrintingPermission.cs
- StateRuntime.cs
- PropertyStore.cs