Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / Update / Internal / EntitySetRetriever.cs / 1 / EntitySetRetriever.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Data.Common.CommandTrees; using System.Data.Metadata.Edm; namespace System.Data.Mapping.Update.Internal { ////// Retrieves extents referenced in a mapping view /// internal class EntitySetRetriever : BasicExpressionVisitor { private List_entitySets; private EntitySetRetriever() { _entitySets = new List (); } /// /// Returns all extents referenced in the given expression tree. /// /// Tree to walk. ///Extents referenced in the tree. internal static IEnumerableGetEntitySets(DbExpression tree) { EntitySetRetriever retriever = new EntitySetRetriever(); if (null != tree) { tree.Accept(retriever); } return retriever._entitySets; } /// /// Adds visited extent to the list. /// /// Scan expression. public override void Visit(DbScanExpression e) { base.Visit(e); EntitySet entitySet = e.Target as EntitySet; if (null != entitySet) { _entitySets.Add(entitySet); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Data.Common.CommandTrees; using System.Data.Metadata.Edm; namespace System.Data.Mapping.Update.Internal { ////// Retrieves extents referenced in a mapping view /// internal class EntitySetRetriever : BasicExpressionVisitor { private List_entitySets; private EntitySetRetriever() { _entitySets = new List (); } /// /// Returns all extents referenced in the given expression tree. /// /// Tree to walk. ///Extents referenced in the tree. internal static IEnumerableGetEntitySets(DbExpression tree) { EntitySetRetriever retriever = new EntitySetRetriever(); if (null != tree) { tree.Accept(retriever); } return retriever._entitySets; } /// /// Adds visited extent to the list. /// /// Scan expression. public override void Visit(DbScanExpression e) { base.Visit(e); EntitySet entitySet = e.Target as EntitySet; if (null != entitySet) { _entitySets.Add(entitySet); } } } } // 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
- SecurityRuntime.cs
- AutomationEventArgs.cs
- ActivationServices.cs
- HGlobalSafeHandle.cs
- ToolStripCodeDomSerializer.cs
- EntityDataSourceSelectingEventArgs.cs
- BuildProviderCollection.cs
- GridToolTip.cs
- ItemsPanelTemplate.cs
- InlineCollection.cs
- LineVisual.cs
- TransformedBitmap.cs
- Msec.cs
- LayoutInformation.cs
- MeshGeometry3D.cs
- QueryNode.cs
- DataGrid.cs
- SafeLocalMemHandle.cs
- ProbeMatchesMessageCD1.cs
- BuildResultCache.cs
- UICuesEvent.cs
- DataRowView.cs
- TemplateLookupAction.cs
- EntityDataSource.cs
- ExpressionBuilderCollection.cs
- ConfigurationException.cs
- FaultPropagationRecord.cs
- relpropertyhelper.cs
- HttpRequestCacheValidator.cs
- DataControlFieldCell.cs
- AdornerDecorator.cs
- InvokeMethodActivity.cs
- CompressEmulationStream.cs
- InlineCollection.cs
- EntityViewGenerationConstants.cs
- DelegatingHeader.cs
- FormViewModeEventArgs.cs
- BitmapEffect.cs
- MiniCustomAttributeInfo.cs
- TcpStreams.cs
- DockPattern.cs
- ImportContext.cs
- ParamArrayAttribute.cs
- TextComposition.cs
- DurableInstanceProvider.cs
- WebHostUnsafeNativeMethods.cs
- PixelFormat.cs
- ActiveXContainer.cs
- InternalSafeNativeMethods.cs
- ImageCollectionEditor.cs
- GeometryConverter.cs
- TreeNodeStyleCollection.cs
- PageCatalogPart.cs
- RuntimeResourceSet.cs
- SecurityContext.cs
- TextMetrics.cs
- HotSpotCollection.cs
- GifBitmapEncoder.cs
- EntityDataSource.cs
- ProjectionCamera.cs
- DataGridViewIntLinkedList.cs
- EnumMemberAttribute.cs
- SafeSecurityHelper.cs
- SoapExtensionStream.cs
- SystemPens.cs
- InvalidProgramException.cs
- ProxyManager.cs
- DesignTimeVisibleAttribute.cs
- EntityAdapter.cs
- _UncName.cs
- CanonicalXml.cs
- GridErrorDlg.cs
- BindableTemplateBuilder.cs
- ConfigurationException.cs
- DES.cs
- ContentOperations.cs
- XmlDataSourceView.cs
- GreaterThanOrEqual.cs
- CheckedListBox.cs
- DbProviderSpecificTypePropertyAttribute.cs
- LicFileLicenseProvider.cs
- ModuleBuilder.cs
- DrawingContextDrawingContextWalker.cs
- GlobalItem.cs
- Set.cs
- ExceptionTrace.cs
- DelimitedListTraceListener.cs
- CharConverter.cs
- SchemaNotation.cs
- WindowsListViewSubItem.cs
- BinaryUtilClasses.cs
- AssociationSetEnd.cs
- ZipIOExtraFieldElement.cs
- ProviderSettingsCollection.cs
- DecoderNLS.cs
- DeclarativeCatalogPart.cs
- ConfigXmlWhitespace.cs
- PlanCompiler.cs
- HttpCookieCollection.cs
- RootNamespaceAttribute.cs