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
- ListItemCollection.cs
- StyleModeStack.cs
- MethodCallConverter.cs
- QueryExtender.cs
- SystemIPGlobalStatistics.cs
- DataGridViewSelectedColumnCollection.cs
- TextTreeFixupNode.cs
- ClassicBorderDecorator.cs
- AttributeData.cs
- ClientBuildManager.cs
- PersonalizableAttribute.cs
- XhtmlTextWriter.cs
- InstanceNotFoundException.cs
- PerformanceCounterPermissionAttribute.cs
- oledbmetadatacolumnnames.cs
- TCPClient.cs
- ConnectionStringSettingsCollection.cs
- CreateUserErrorEventArgs.cs
- TextTreeDeleteContentUndoUnit.cs
- ViewManager.cs
- Screen.cs
- ToolStripComboBox.cs
- Highlights.cs
- TextServicesProperty.cs
- ProcessHostFactoryHelper.cs
- GeneralTransform2DTo3DTo2D.cs
- DataControlImageButton.cs
- DecoderFallback.cs
- HandlerMappingMemo.cs
- Composition.cs
- DataQuery.cs
- XpsS0ValidatingLoader.cs
- StrokeFIndices.cs
- AsnEncodedData.cs
- GridViewRowPresenterBase.cs
- EventDrivenDesigner.cs
- SynchronizationContext.cs
- ConsoleEntryPoint.cs
- CurrentTimeZone.cs
- WrappedReader.cs
- XmlAggregates.cs
- PermissionSetEnumerator.cs
- XhtmlBasicPhoneCallAdapter.cs
- HitTestDrawingContextWalker.cs
- ColumnCollectionEditor.cs
- EntityAdapter.cs
- SoapTypeAttribute.cs
- DbDataSourceEnumerator.cs
- Soap.cs
- Margins.cs
- BitmapSource.cs
- TextUtf8RawTextWriter.cs
- LineGeometry.cs
- CodeMethodReturnStatement.cs
- GraphicsContainer.cs
- UnsafeCollabNativeMethods.cs
- SerialReceived.cs
- MessageOperationFormatter.cs
- SignedPkcs7.cs
- baseshape.cs
- Axis.cs
- EmptyStringExpandableObjectConverter.cs
- References.cs
- WebServiceEndpoint.cs
- DataGridViewLinkCell.cs
- exports.cs
- OpCodes.cs
- BitmapFrameEncode.cs
- AdCreatedEventArgs.cs
- VisualProxy.cs
- SurrogateSelector.cs
- ScrollViewer.cs
- Identity.cs
- PlanCompilerUtil.cs
- SiteMapNodeCollection.cs
- MailMessage.cs
- KeyedCollection.cs
- TreeNodeStyle.cs
- PropertySourceInfo.cs
- BitmapEffectInputData.cs
- _IPv4Address.cs
- DataGridTable.cs
- HttpModuleCollection.cs
- PenLineJoinValidation.cs
- DataServiceContext.cs
- ObjectParameter.cs
- ClientCredentialsElement.cs
- IntSecurity.cs
- StylusButtonCollection.cs
- XmlNode.cs
- XmlnsDictionary.cs
- PopupControlService.cs
- BaseDataList.cs
- Parameter.cs
- FamilyTypeface.cs
- PropertySourceInfo.cs
- PolyLineSegment.cs
- Odbc32.cs
- HandleRef.cs
- ReadOnlyState.cs