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
- MemberInfoSerializationHolder.cs
- ToolBarTray.cs
- WindowsFormsHostPropertyMap.cs
- TextTreeTextBlock.cs
- EditorZoneBase.cs
- SafeEventLogWriteHandle.cs
- AssemblyResourceLoader.cs
- TypeUsage.cs
- QueryRewriter.cs
- PageThemeParser.cs
- ContainerFilterService.cs
- CommandManager.cs
- TemplateBindingExpression.cs
- PowerEase.cs
- ComboBoxAutomationPeer.cs
- PageTheme.cs
- WebServiceClientProxyGenerator.cs
- DiagnosticTrace.cs
- MSAAWinEventWrap.cs
- StaticResourceExtension.cs
- StaticContext.cs
- MediaSystem.cs
- SqlDataReader.cs
- Rotation3DAnimationUsingKeyFrames.cs
- CssClassPropertyAttribute.cs
- OuterGlowBitmapEffect.cs
- RangeValuePatternIdentifiers.cs
- XmlComment.cs
- FormViewPagerRow.cs
- XmlExceptionHelper.cs
- WebServiceFault.cs
- ListenerAdapterBase.cs
- ISAPIApplicationHost.cs
- ProcessExitedException.cs
- SourceFileBuildProvider.cs
- unitconverter.cs
- NativeMethods.cs
- VectorAnimationUsingKeyFrames.cs
- ServiceContractViewControl.cs
- SqlRecordBuffer.cs
- ButtonBaseAdapter.cs
- ResourceDisplayNameAttribute.cs
- TextTreeTextElementNode.cs
- VScrollBar.cs
- TemplateInstanceAttribute.cs
- FormViewCommandEventArgs.cs
- MsmqTransportBindingElement.cs
- ChannelFactoryBase.cs
- SmiRequestExecutor.cs
- HelpInfo.cs
- SharedConnectionInfo.cs
- MappingMetadataHelper.cs
- CompilerError.cs
- OdbcError.cs
- FontClient.cs
- PenThreadWorker.cs
- FormViewRow.cs
- DiscoveryDefaults.cs
- shaperfactory.cs
- Point4D.cs
- ScrollEvent.cs
- ServiceInfoCollection.cs
- ServiceOperation.cs
- WindowsRegion.cs
- AttributeCollection.cs
- FrameAutomationPeer.cs
- DataGridViewUtilities.cs
- ValidationRule.cs
- RegionInfo.cs
- ServiceModelSecurityTokenRequirement.cs
- SignedXml.cs
- BehaviorDragDropEventArgs.cs
- MessageHeaderDescriptionCollection.cs
- GlyphInfoList.cs
- Int16Storage.cs
- Calendar.cs
- PanelContainerDesigner.cs
- Avt.cs
- ValidatingReaderNodeData.cs
- RoleGroup.cs
- DPCustomTypeDescriptor.cs
- PipelineModuleStepContainer.cs
- TransformerInfo.cs
- Thread.cs
- BuildResult.cs
- Int16Converter.cs
- SqlDataRecord.cs
- RelatedView.cs
- ObjectListFieldsPage.cs
- FunctionNode.cs
- EFColumnProvider.cs
- DiscoveryClientDocuments.cs
- ServiceModelSecurityTokenTypes.cs
- Visual3DCollection.cs
- ExpressionConverter.cs
- PageCatalogPartDesigner.cs
- CqlQuery.cs
- ArcSegment.cs
- CodeAttachEventStatement.cs
- CodeVariableReferenceExpression.cs