Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / FilteredSchemaElementLookUpTable.cs / 1305376 / FilteredSchemaElementLookUpTable.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Data; namespace System.Data.EntityModel.SchemaObjectModel { ////// Summary description for FilteredSchemaTypes. /// internal sealed class FilteredSchemaElementLookUpTable: IEnumerable , ISchemaElementLookUpTable where T : S where S : SchemaElement { #region Instance Fields private SchemaElementLookUpTable _lookUpTable = null; #endregion #region Public Methods ////// /// /// public FilteredSchemaElementLookUpTable(SchemaElementLookUpTablelookUpTable) { _lookUpTable = lookUpTable; } ////// /// ///public IEnumerator GetEnumerator() { return _lookUpTable.GetFilteredEnumerator (); } /// /// /// ///IEnumerator System.Collections.IEnumerable.GetEnumerator() { return _lookUpTable.GetFilteredEnumerator (); } /// /// /// public int Count { get { int count = 0; foreach ( SchemaElement element in _lookUpTable ) { if ( element is T ) { ++count; } } return count; } } ////// /// /// ///public bool ContainsKey(string key) { if ( !_lookUpTable.ContainsKey(key) ) return false; return _lookUpTable[key] as T != null; } /// /// /// public T this[string key] { get { S element = _lookUpTable[key]; if ( element == null ) { return null; } T elementAsT = element as T; if ( elementAsT != null ) { return elementAsT; } throw EntityUtil.InvalidOperation(System.Data.Entity.Strings.UnexpectedTypeInCollection(element.GetType(),key)); } } ////// /// /// ///public T LookUpEquivalentKey(string key) { return _lookUpTable.LookUpEquivalentKey(key) as T; } #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
- DataBindingCollection.cs
- LiteralControl.cs
- MultipleViewPatternIdentifiers.cs
- SoapAttributeAttribute.cs
- XmlSchemaSimpleTypeRestriction.cs
- input.cs
- VisualStyleElement.cs
- BitHelper.cs
- InfoCardTraceRecord.cs
- WebPartDeleteVerb.cs
- TraceSection.cs
- FacetEnabledSchemaElement.cs
- MachineKeySection.cs
- DbConnectionPoolOptions.cs
- ExtentJoinTreeNode.cs
- DBPropSet.cs
- TextBoxRenderer.cs
- DbProviderFactories.cs
- MSAAWinEventWrap.cs
- VariableBinder.cs
- WebConfigurationFileMap.cs
- XsltContext.cs
- UserNameServiceElement.cs
- CollectionViewSource.cs
- GifBitmapDecoder.cs
- brushes.cs
- JsonMessageEncoderFactory.cs
- XmlElement.cs
- PerformanceCounterCategory.cs
- StringComparer.cs
- IEnumerable.cs
- SystemKeyConverter.cs
- SortQueryOperator.cs
- XmlILStorageConverter.cs
- EditorPart.cs
- SqlCacheDependencyDatabaseCollection.cs
- FontUnitConverter.cs
- XDRSchema.cs
- FixedBufferAttribute.cs
- BindingOperations.cs
- UpdateManifestForBrowserApplication.cs
- Timer.cs
- SyndicationLink.cs
- recordstatefactory.cs
- TreeViewHitTestInfo.cs
- CallSiteHelpers.cs
- SchemaMapping.cs
- DomainUpDown.cs
- SystemIPGlobalProperties.cs
- GiveFeedbackEvent.cs
- TextBox.cs
- InternalControlCollection.cs
- ServiceModelDictionary.cs
- ReversePositionQuery.cs
- ToolStripEditorManager.cs
- QueryStoreStatusRequest.cs
- ArrangedElementCollection.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PointKeyFrameCollection.cs
- storagemappingitemcollection.viewdictionary.cs
- Viewport2DVisual3D.cs
- MarkupObject.cs
- _MultipleConnectAsync.cs
- FacetChecker.cs
- UmAlQuraCalendar.cs
- ComplexBindingPropertiesAttribute.cs
- SerializationEventsCache.cs
- TraceLevelHelper.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- XsdDuration.cs
- FixedSOMPageConstructor.cs
- UnmanagedMarshal.cs
- peernodestatemanager.cs
- UnsafeNativeMethods.cs
- ComponentManagerBroker.cs
- StandardTransformFactory.cs
- XmlSerializationReader.cs
- WindowShowOrOpenTracker.cs
- VisualProxy.cs
- RefreshPropertiesAttribute.cs
- LoginView.cs
- ComponentChangingEvent.cs
- BuildManager.cs
- GorillaCodec.cs
- PageContent.cs
- SHA384.cs
- CompositeFontParser.cs
- HotSpot.cs
- ToggleButtonAutomationPeer.cs
- controlskin.cs
- PathFigureCollectionConverter.cs
- RowVisual.cs
- ClientSponsor.cs
- linebase.cs
- TextPointerBase.cs
- FlowDocumentPageViewerAutomationPeer.cs
- DbProviderConfigurationHandler.cs
- SecurityValidationBehavior.cs
- BitVector32.cs
- XPathConvert.cs