Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DataColumnMapping.cs
- MethodCallConverter.cs
- SyntaxCheck.cs
- ConstraintManager.cs
- Literal.cs
- QueryExpr.cs
- InkCanvasFeedbackAdorner.cs
- Vector3DValueSerializer.cs
- DSASignatureDeformatter.cs
- StylusCollection.cs
- StrokeCollectionDefaultValueFactory.cs
- TextEditorSpelling.cs
- LookupBindingPropertiesAttribute.cs
- SignatureDescription.cs
- ExpressionParser.cs
- PixelShader.cs
- ValidatorCollection.cs
- WindowsListViewItem.cs
- NumericUpDownAccelerationCollection.cs
- SrgsElementFactoryCompiler.cs
- Soap.cs
- PropertyValueUIItem.cs
- MetafileHeader.cs
- HierarchicalDataSourceConverter.cs
- XsdDuration.cs
- ObjectQueryState.cs
- VarRemapper.cs
- AuthenticationModulesSection.cs
- PageAdapter.cs
- FileUtil.cs
- RSAOAEPKeyExchangeDeformatter.cs
- AspNetHostingPermission.cs
- MonitorWrapper.cs
- WebPartDeleteVerb.cs
- KeyPressEvent.cs
- Page.cs
- TextElementEnumerator.cs
- CrossSiteScriptingValidation.cs
- BaseTemplateBuildProvider.cs
- behaviorssection.cs
- ParameterDataSourceExpression.cs
- RegexReplacement.cs
- ConfigurationValues.cs
- OleDbConnectionInternal.cs
- ConversionHelper.cs
- CompilerWrapper.cs
- TableLayoutSettingsTypeConverter.cs
- CodeTypeDeclaration.cs
- StringPropertyBuilder.cs
- TextEditorLists.cs
- MemberDescriptor.cs
- _NTAuthentication.cs
- ModelTreeEnumerator.cs
- UriTemplateDispatchFormatter.cs
- UserMapPath.cs
- TreeViewAutomationPeer.cs
- ItemsChangedEventArgs.cs
- ViewPort3D.cs
- MetadataFile.cs
- EncryptedKey.cs
- Listbox.cs
- ZoneIdentityPermission.cs
- SymLanguageType.cs
- CodeLabeledStatement.cs
- CompensationExtension.cs
- TextRunCacheImp.cs
- CapabilitiesAssignment.cs
- TreeWalker.cs
- StoreItemCollection.cs
- SessionStateUtil.cs
- HttpProfileBase.cs
- AxHost.cs
- Missing.cs
- DbProviderFactories.cs
- DataBindingExpressionBuilder.cs
- ListViewTableRow.cs
- ObjectView.cs
- URI.cs
- UriTemplate.cs
- RandomNumberGenerator.cs
- safemediahandle.cs
- ReferencedCollectionType.cs
- PrivilegedConfigurationManager.cs
- FirstMatchCodeGroup.cs
- FixedElement.cs
- DbConnectionPoolGroupProviderInfo.cs
- ClientSettingsStore.cs
- XmlQuerySequence.cs
- XmlSchemaException.cs
- RegionIterator.cs
- ExpressionDumper.cs
- Pkcs7Recipient.cs
- HttpWebResponse.cs
- HierarchicalDataBoundControlAdapter.cs
- TypeDelegator.cs
- MSAANativeProvider.cs
- Lock.cs
- ResizeGrip.cs
- TextTreeInsertUndoUnit.cs
- XmlPreloadedResolver.cs