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 IEnumerable GetEntitySets(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 IEnumerable GetEntitySets(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
- DictionaryBase.cs
- StringValidatorAttribute.cs
- EditingScopeUndoUnit.cs
- AnimatedTypeHelpers.cs
- ManagedIStream.cs
- CompiledRegexRunnerFactory.cs
- UserNameSecurityTokenProvider.cs
- MultiView.cs
- PointAnimation.cs
- _emptywebproxy.cs
- _RequestCacheProtocol.cs
- ServerValidateEventArgs.cs
- ThreadInterruptedException.cs
- CurrentChangedEventManager.cs
- NullReferenceException.cs
- ColorAnimationBase.cs
- ApplicationDirectory.cs
- ModelItemImpl.cs
- ThemeInfoAttribute.cs
- XmlSchemaComplexContent.cs
- XmlSchemaAnyAttribute.cs
- SecurityTokenValidationException.cs
- TripleDES.cs
- Page.cs
- safex509handles.cs
- OleDbConnectionInternal.cs
- HtmlShimManager.cs
- LoadGrammarCompletedEventArgs.cs
- AnnouncementEndpoint.cs
- ImageFormatConverter.cs
- SqlColumnizer.cs
- PlacementWorkspace.cs
- PageAdapter.cs
- ProcessInputEventArgs.cs
- ArrangedElementCollection.cs
- SQlBooleanStorage.cs
- AlgoModule.cs
- ModifierKeysValueSerializer.cs
- RadioButtonAutomationPeer.cs
- PersonalizationEntry.cs
- ChameleonKey.cs
- OracleFactory.cs
- FlowchartStart.xaml.cs
- ValuePattern.cs
- KnownTypes.cs
- Attributes.cs
- OledbConnectionStringbuilder.cs
- ListDictionaryInternal.cs
- DataGridViewControlCollection.cs
- PanelContainerDesigner.cs
- SafeFileMapViewHandle.cs
- EventMappingSettings.cs
- RankException.cs
- WindowsFormsSynchronizationContext.cs
- SqlDataSourceCommandEventArgs.cs
- ProgressBarHighlightConverter.cs
- Closure.cs
- TreeNodeCollectionEditor.cs
- MethodExpr.cs
- __ComObject.cs
- EncoderParameters.cs
- TextTreeTextElementNode.cs
- TimeSpan.cs
- TextCompositionManager.cs
- WindowsFormsHelpers.cs
- RowToFieldTransformer.cs
- MetadataHelper.cs
- InvokeMethodActivityDesigner.cs
- PrimarySelectionAdorner.cs
- XPathParser.cs
- BufferModeSettings.cs
- RenamedEventArgs.cs
- UriSchemeKeyedCollection.cs
- PointAnimationUsingKeyFrames.cs
- EncryptedKey.cs
- HasCopySemanticsAttribute.cs
- PbrsForward.cs
- Method.cs
- AsyncResult.cs
- DesignerTransaction.cs
- SimpleWebHandlerParser.cs
- GridViewRowEventArgs.cs
- PauseStoryboard.cs
- ConfigXmlText.cs
- HttpDictionary.cs
- StylusButtonCollection.cs
- SqlInfoMessageEvent.cs
- DeferredElementTreeState.cs
- ResizeGrip.cs
- AuthorizationRule.cs
- SessionStateContainer.cs
- ListItemsPage.cs
- XAMLParseException.cs
- TabOrder.cs
- TypedTableBase.cs
- QuarticEase.cs
- MonikerProxyAttribute.cs
- Activator.cs
- OleServicesContext.cs
- ReaderContextStackData.cs