Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Button.cs
- BufferedWebEventProvider.cs
- SettingsBindableAttribute.cs
- KeyedCollection.cs
- ScanQueryOperator.cs
- CaseInsensitiveComparer.cs
- EncoderBestFitFallback.cs
- CommandSet.cs
- TypeDependencyAttribute.cs
- ControlIdConverter.cs
- EntityConnectionStringBuilder.cs
- MappingSource.cs
- BuildProviderAppliesToAttribute.cs
- ListSourceHelper.cs
- AsnEncodedData.cs
- NestedContainer.cs
- SoapIncludeAttribute.cs
- BaseTemplateBuildProvider.cs
- PropertyChangedEventManager.cs
- ManagementException.cs
- DataGridHelper.cs
- HuffCodec.cs
- DataGridViewCellStyleConverter.cs
- Validator.cs
- remotingproxy.cs
- BamlMapTable.cs
- PriorityBindingExpression.cs
- StoreContentChangedEventArgs.cs
- HttpRuntime.cs
- ToolboxItemFilterAttribute.cs
- StateMachineTimers.cs
- ThousandthOfEmRealPoints.cs
- FloaterBaseParagraph.cs
- TemplateBindingExtension.cs
- InputReport.cs
- BrushConverter.cs
- GridItem.cs
- DBCommand.cs
- PreviewPrintController.cs
- SafeFileHandle.cs
- CharStorage.cs
- VisemeEventArgs.cs
- MetadataCollection.cs
- CustomCategoryAttribute.cs
- MemberBinding.cs
- XmlSecureResolver.cs
- PrePrepareMethodAttribute.cs
- TokenFactoryBase.cs
- NativeMethods.cs
- StateMachine.cs
- IndexOutOfRangeException.cs
- AssemblyBuilder.cs
- HierarchicalDataTemplate.cs
- Schema.cs
- handlecollector.cs
- KnownBoxes.cs
- QueryReaderSettings.cs
- InputLanguageManager.cs
- FormParameter.cs
- CallbackValidator.cs
- CodeIterationStatement.cs
- ErrorLog.cs
- UserPreferenceChangedEventArgs.cs
- DropDownList.cs
- SqlWebEventProvider.cs
- infer.cs
- TableLayoutColumnStyleCollection.cs
- ContentPropertyAttribute.cs
- StyleCollection.cs
- DragEvent.cs
- SBCSCodePageEncoding.cs
- DescendantBaseQuery.cs
- ScrollBar.cs
- HtmlFormAdapter.cs
- SchemaEntity.cs
- SystemIPv6InterfaceProperties.cs
- TextEditorDragDrop.cs
- GlobalizationAssembly.cs
- CompModSwitches.cs
- AndCondition.cs
- ThemeDirectoryCompiler.cs
- ModelTreeEnumerator.cs
- Variable.cs
- AssociationSetEnd.cs
- PlatformCulture.cs
- _UncName.cs
- DateTimeUtil.cs
- GlobalizationSection.cs
- serverconfig.cs
- IgnoreFileBuildProvider.cs
- CompilerHelpers.cs
- ShaperBuffers.cs
- AdapterUtil.cs
- DetailsViewRowCollection.cs
- ModifierKeysValueSerializer.cs
- EditorAttribute.cs
- EpmSourcePathSegment.cs
- SchemaObjectWriter.cs
- DataControlField.cs
- GridViewEditEventArgs.cs