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
- FileLevelControlBuilderAttribute.cs
- CalendarData.cs
- SemanticKeyElement.cs
- QilInvoke.cs
- CollectionViewGroup.cs
- RequestCacheValidator.cs
- DataGridViewAdvancedBorderStyle.cs
- SoapEnumAttribute.cs
- Recipient.cs
- AttributeCollection.cs
- OutputScope.cs
- ViewKeyConstraint.cs
- XmlText.cs
- OutputCacheSettingsSection.cs
- SelectorAutomationPeer.cs
- UserPreferenceChangingEventArgs.cs
- FontSizeConverter.cs
- DataViewSettingCollection.cs
- TextBoxRenderer.cs
- BitmapImage.cs
- TextDecorationCollection.cs
- XamlFrame.cs
- ProxyHelper.cs
- DrawingGroupDrawingContext.cs
- FactoryGenerator.cs
- XmlSchemaExternal.cs
- SimpleTypeResolver.cs
- DisableDpiAwarenessAttribute.cs
- SqlDataSourceCommandEventArgs.cs
- ServiceHttpHandlerFactory.cs
- KoreanCalendar.cs
- IFlowDocumentViewer.cs
- ColorKeyFrameCollection.cs
- AnnotationComponentChooser.cs
- TableRowCollection.cs
- IndicShape.cs
- AdRotator.cs
- SingleBodyParameterMessageFormatter.cs
- SymDocumentType.cs
- ValidationErrorCollection.cs
- ObjectDataSourceChooseMethodsPanel.cs
- TaskForm.cs
- PageStatePersister.cs
- BlockCollection.cs
- XPathMultyIterator.cs
- SecurityContextTokenCache.cs
- OdbcException.cs
- ProcessThread.cs
- GridViewEditEventArgs.cs
- SectionRecord.cs
- XXXOnTypeBuilderInstantiation.cs
- PreloadedPackages.cs
- SocketInformation.cs
- ColorBuilder.cs
- Drawing.cs
- AssemblyFilter.cs
- TreeViewItemAutomationPeer.cs
- ExceptionTrace.cs
- XmlCollation.cs
- ExcCanonicalXml.cs
- IdleTimeoutMonitor.cs
- WebPartConnectionsCancelEventArgs.cs
- BaseTemplateParser.cs
- Parameter.cs
- CheckPair.cs
- RecognizerInfo.cs
- EntityDesignerUtils.cs
- TextFindEngine.cs
- WindowsGraphics.cs
- CheckBox.cs
- ScalarConstant.cs
- TextEditorDragDrop.cs
- UnsafeNativeMethods.cs
- Margins.cs
- securestring.cs
- Version.cs
- GroupBox.cs
- ServiceMemoryGates.cs
- StyleBamlRecordReader.cs
- CommonProperties.cs
- ClientUriBehavior.cs
- ExtensionCollection.cs
- DeadCharTextComposition.cs
- TemplateKeyConverter.cs
- MergablePropertyAttribute.cs
- DragSelectionMessageFilter.cs
- Expander.cs
- __Filters.cs
- DelegatingConfigHost.cs
- WindowsListViewGroupHelper.cs
- EventLogTraceListener.cs
- DefaultPrintController.cs
- MsmqTransportSecurityElement.cs
- SessionStateUtil.cs
- Scripts.cs
- DesignerTransactionCloseEvent.cs
- SmiContext.cs
- SessionParameter.cs
- CannotUnloadAppDomainException.cs
- HtmlImageAdapter.cs