Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / TargetPerspective.cs / 2 / TargetPerspective.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- namespace System.Data.Metadata.Edm { using System.Collections.Generic; using System.Globalization; ////// Internal helper class for query /// internal class TargetPerspective : Perspective { #region Constructors ////// Creates a new instance of perspective class so that query can work /// ignorant of all spaces /// /// runtime metadata container internal TargetPerspective(MetadataWorkspace metadataWorkspace) : base(metadataWorkspace, DataSpace.SSpace) { _modelPerspective = new ModelPerspective(metadataWorkspace); } #endregion #region Fields // TargetPerspective uses a ModelPerspective for a second lookup in type lookup private ModelPerspective _modelPerspective; #endregion #region Methods ////// Look up a type in the target data space based upon the fullName /// /// fullName /// true for case-insensitive lookup /// ///a list of types that have the specified full name but may differ by strong name internal override bool TryGetTypeByName(string fullName, bool ignoreCase, out TypeUsage usage) { EntityUtil.CheckStringArgument(fullName, "fullName"); EdmType edmType = null; if (this.MetadataWorkspace.TryGetItem(fullName, ignoreCase, this.TargetDataspace, out edmType)) { usage = TypeUsage.Create(edmType); usage = Helper.GetModelTypeUsage(usage); return true; } return _modelPerspective.TryGetTypeByName(fullName, ignoreCase, out usage); } /// /// Returns the entity container in CSpace or SSpace /// /// /// /// ///internal override bool TryGetEntityContainer(string name, bool ignoreCase, out EntityContainer entityContainer) { if (!base.TryGetEntityContainer(name, ignoreCase, out entityContainer)) { return _modelPerspective.TryGetEntityContainer(name, ignoreCase, out entityContainer); } return true; } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- namespace System.Data.Metadata.Edm { using System.Collections.Generic; using System.Globalization; ////// Internal helper class for query /// internal class TargetPerspective : Perspective { #region Constructors ////// Creates a new instance of perspective class so that query can work /// ignorant of all spaces /// /// runtime metadata container internal TargetPerspective(MetadataWorkspace metadataWorkspace) : base(metadataWorkspace, DataSpace.SSpace) { _modelPerspective = new ModelPerspective(metadataWorkspace); } #endregion #region Fields // TargetPerspective uses a ModelPerspective for a second lookup in type lookup private ModelPerspective _modelPerspective; #endregion #region Methods ////// Look up a type in the target data space based upon the fullName /// /// fullName /// true for case-insensitive lookup /// ///a list of types that have the specified full name but may differ by strong name internal override bool TryGetTypeByName(string fullName, bool ignoreCase, out TypeUsage usage) { EntityUtil.CheckStringArgument(fullName, "fullName"); EdmType edmType = null; if (this.MetadataWorkspace.TryGetItem(fullName, ignoreCase, this.TargetDataspace, out edmType)) { usage = TypeUsage.Create(edmType); usage = Helper.GetModelTypeUsage(usage); return true; } return _modelPerspective.TryGetTypeByName(fullName, ignoreCase, out usage); } /// /// Returns the entity container in CSpace or SSpace /// /// /// /// ///internal override bool TryGetEntityContainer(string name, bool ignoreCase, out EntityContainer entityContainer) { if (!base.TryGetEntityContainer(name, ignoreCase, out entityContainer)) { return _modelPerspective.TryGetEntityContainer(name, ignoreCase, out entityContainer); } return true; } #endregion } } // 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
- WebPartConnection.cs
- _AutoWebProxyScriptEngine.cs
- _UriTypeConverter.cs
- ToolboxCategory.cs
- TemplateComponentConnector.cs
- SecurityContext.cs
- SelectionHighlightInfo.cs
- UnhandledExceptionEventArgs.cs
- ReadOnlyPropertyMetadata.cs
- ThreadExceptionDialog.cs
- safex509handles.cs
- DataTableNewRowEvent.cs
- GridViewUpdatedEventArgs.cs
- TableLayoutCellPaintEventArgs.cs
- DomNameTable.cs
- AbandonedMutexException.cs
- UmAlQuraCalendar.cs
- WebCategoryAttribute.cs
- TextParagraphProperties.cs
- DataGridViewRowsRemovedEventArgs.cs
- DiffuseMaterial.cs
- DataSourceView.cs
- WinEventWrap.cs
- ButtonChrome.cs
- AssociationType.cs
- XmlIgnoreAttribute.cs
- ToolStripHighContrastRenderer.cs
- CharUnicodeInfo.cs
- ChoiceConverter.cs
- Roles.cs
- PropertyGridCommands.cs
- Policy.cs
- DbException.cs
- ImageList.cs
- Trace.cs
- ZipIOCentralDirectoryFileHeader.cs
- IdentityNotMappedException.cs
- RepeatButton.cs
- Accessors.cs
- SafeCryptContextHandle.cs
- FixUp.cs
- RectangleGeometry.cs
- DBSqlParserColumn.cs
- RequestNavigateEventArgs.cs
- WindowsStatusBar.cs
- XmlChoiceIdentifierAttribute.cs
- BevelBitmapEffect.cs
- ValueExpressions.cs
- StyleXamlParser.cs
- DeferredTextReference.cs
- HuffmanTree.cs
- KnownTypes.cs
- InkCanvas.cs
- NewExpression.cs
- FigureHelper.cs
- AccessedThroughPropertyAttribute.cs
- EditCommandColumn.cs
- FormClosedEvent.cs
- OdbcPermission.cs
- IntegrationExceptionEventArgs.cs
- NumberAction.cs
- TextDecorationCollection.cs
- MediaContextNotificationWindow.cs
- CapabilitiesSection.cs
- ExpressionPrefixAttribute.cs
- SystemIPAddressInformation.cs
- SpeechRecognizer.cs
- XmlSchemaObject.cs
- MSG.cs
- ListViewItemCollectionEditor.cs
- ConfigXmlSignificantWhitespace.cs
- ContactManager.cs
- BooleanConverter.cs
- SqlTransaction.cs
- Panel.cs
- LogicalExpr.cs
- SourceFilter.cs
- SQLBinary.cs
- Visual3D.cs
- InlineUIContainer.cs
- Int16AnimationUsingKeyFrames.cs
- DrawingGroup.cs
- NavigationWindowAutomationPeer.cs
- DataTemplateSelector.cs
- IteratorFilter.cs
- _NetRes.cs
- TextFindEngine.cs
- EntityProviderServices.cs
- x509utils.cs
- BezierSegment.cs
- ErrorLog.cs
- Control.cs
- LockRenewalTask.cs
- CommandSet.cs
- XmlArrayItemAttribute.cs
- HashCodeCombiner.cs
- CodeTypeReferenceCollection.cs
- BinaryConverter.cs
- IndependentlyAnimatedPropertyMetadata.cs
- GroupBoxAutomationPeer.cs