Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / TargetPerspective.cs / 1305376 / TargetPerspective.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- ObjRef.cs
- GridViewUpdatedEventArgs.cs
- PropertyStore.cs
- TypeHelper.cs
- PointLight.cs
- CannotUnloadAppDomainException.cs
- DataBoundControl.cs
- TextModifier.cs
- PhysicalOps.cs
- Parameter.cs
- UnaryQueryOperator.cs
- JumpPath.cs
- StatusBarDrawItemEvent.cs
- ProfessionalColors.cs
- Int32EqualityComparer.cs
- RelationshipNavigation.cs
- OleDbEnumerator.cs
- MsmqChannelListenerBase.cs
- AttributedMetaModel.cs
- Internal.cs
- DbBuffer.cs
- ByteFacetDescriptionElement.cs
- RefExpr.cs
- UpnEndpointIdentityExtension.cs
- RtfNavigator.cs
- TypeSystemHelpers.cs
- _FixedSizeReader.cs
- XPathException.cs
- AttributeProviderAttribute.cs
- WorkflowServiceBehavior.cs
- OdbcTransaction.cs
- SoapServerMethod.cs
- ColorIndependentAnimationStorage.cs
- ReceiveContext.cs
- odbcmetadatacollectionnames.cs
- StaticSiteMapProvider.cs
- Trace.cs
- IdentityManager.cs
- TextClipboardData.cs
- Highlights.cs
- SiteMapDataSourceView.cs
- CmsInterop.cs
- ExceptionRoutedEventArgs.cs
- ObfuscateAssemblyAttribute.cs
- ToolStripDropDownButton.cs
- StrokeNodeData.cs
- StyleTypedPropertyAttribute.cs
- cookiecontainer.cs
- propertytag.cs
- documentsequencetextview.cs
- PropertyGridCommands.cs
- InvalidateEvent.cs
- CodeEntryPointMethod.cs
- StrokeNodeData.cs
- DLinqTableProvider.cs
- ActivityTypeDesigner.xaml.cs
- Tuple.cs
- ArraySortHelper.cs
- ExpressionBuilder.cs
- SoapCodeExporter.cs
- RefExpr.cs
- TypefaceCollection.cs
- MatrixTransform.cs
- RangeBaseAutomationPeer.cs
- UnitySerializationHolder.cs
- NetworkAddressChange.cs
- VectorCollection.cs
- CodeParameterDeclarationExpressionCollection.cs
- NavigationService.cs
- SqlRowUpdatingEvent.cs
- SourceFileBuildProvider.cs
- Margins.cs
- TextServicesCompartmentEventSink.cs
- ISessionStateStore.cs
- TextDecorationCollection.cs
- RemoteHelper.cs
- PagePropertiesChangingEventArgs.cs
- HostSecurityManager.cs
- DriveInfo.cs
- OperationAbortedException.cs
- SoapServerMessage.cs
- AssociationSet.cs
- Number.cs
- ObjectStateFormatter.cs
- DbConnectionPoolCounters.cs
- FocusManager.cs
- SR.cs
- CreateCardRequest.cs
- TimeZoneNotFoundException.cs
- MSAANativeProvider.cs
- TextEditorMouse.cs
- ParameterModifier.cs
- SecurityContextSecurityTokenResolver.cs
- MouseGesture.cs
- CustomAttributeBuilder.cs
- CodeGenerator.cs
- ToolboxItemFilterAttribute.cs
- MembershipPasswordException.cs
- OrderedDictionary.cs
- Binding.cs