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
- WebDescriptionAttribute.cs
- DirectoryInfo.cs
- KeyValueSerializer.cs
- DayRenderEvent.cs
- Serializer.cs
- TemplateBindingExpressionConverter.cs
- DesignerSelectionListAdapter.cs
- NodeFunctions.cs
- EpmCustomContentWriterNodeData.cs
- RectangleHotSpot.cs
- LayoutEditorPart.cs
- DesignerActionItem.cs
- ReachNamespaceInfo.cs
- PointHitTestParameters.cs
- ExtendLockAsyncResult.cs
- ISessionStateStore.cs
- ToolStripComboBox.cs
- GridViewEditEventArgs.cs
- ViewgenContext.cs
- DataControlFieldCell.cs
- ConditionBrowserDialog.cs
- EdmScalarPropertyAttribute.cs
- ColorContextHelper.cs
- ApplicationFileCodeDomTreeGenerator.cs
- AgileSafeNativeMemoryHandle.cs
- ZipIOModeEnforcingStream.cs
- ReadOnlyCollectionBuilder.cs
- TextDecoration.cs
- DataControlCommands.cs
- ExtenderHelpers.cs
- DateTimeSerializationSection.cs
- GcSettings.cs
- HttpListenerContext.cs
- _HeaderInfo.cs
- ConfigUtil.cs
- CacheDict.cs
- SerializationObjectManager.cs
- PrintDialog.cs
- TransformerConfigurationWizardBase.cs
- ToolStripDropDownButton.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- WindowsBrush.cs
- InteropTrackingRecord.cs
- TimerEventSubscriptionCollection.cs
- ValueSerializer.cs
- StructuralObject.cs
- SettingsBindableAttribute.cs
- _DisconnectOverlappedAsyncResult.cs
- WebColorConverter.cs
- PropertyHelper.cs
- SqlBooleanizer.cs
- RequiredFieldValidator.cs
- UIElement3DAutomationPeer.cs
- Rectangle.cs
- InvokeProviderWrapper.cs
- ProfileEventArgs.cs
- RightsManagementPermission.cs
- NavigatorOutput.cs
- TextRangeSerialization.cs
- TableRow.cs
- XmlReturnReader.cs
- CrossContextChannel.cs
- CustomErrorCollection.cs
- DefaultWorkflowTransactionService.cs
- IIS7WorkerRequest.cs
- ConfigurationException.cs
- AssemblyResourceLoader.cs
- SvcMapFile.cs
- LayoutEngine.cs
- XmlChildNodes.cs
- BamlRecordWriter.cs
- TypefaceMap.cs
- PagesSection.cs
- LineMetrics.cs
- XmlDesigner.cs
- WindowsListBox.cs
- MappingException.cs
- ToolBarDesigner.cs
- OutputCacheProfileCollection.cs
- BinaryObjectReader.cs
- PrePrepareMethodAttribute.cs
- TickBar.cs
- DiscreteKeyFrames.cs
- RequestQueue.cs
- StringFormat.cs
- BuildProviderUtils.cs
- RayMeshGeometry3DHitTestResult.cs
- HttpProfileBase.cs
- TraversalRequest.cs
- AppSecurityManager.cs
- DataSourceView.cs
- LinkConverter.cs
- StrongNameMembershipCondition.cs
- ResourceCollectionInfo.cs
- StringDictionaryCodeDomSerializer.cs
- FunctionUpdateCommand.cs
- SecurityDescriptor.cs
- AppModelKnownContentFactory.cs
- DocumentViewerBase.cs
- SiteMapHierarchicalDataSourceView.cs