Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- // // 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
- PersistenceMetadataNamespace.cs
- ToolBarPanel.cs
- SourceFileInfo.cs
- IItemProperties.cs
- SafeHandles.cs
- ToolStripDropTargetManager.cs
- DataServiceQueryException.cs
- DescendentsWalker.cs
- HostExecutionContextManager.cs
- ScrollContentPresenter.cs
- CannotUnloadAppDomainException.cs
- EventLogException.cs
- TypeBuilderInstantiation.cs
- Collection.cs
- ColorConvertedBitmap.cs
- Viewport3DVisual.cs
- Brush.cs
- InputBinder.cs
- SerializerDescriptor.cs
- XsdValidatingReader.cs
- SamlSerializer.cs
- SetMemberBinder.cs
- TextTreeUndoUnit.cs
- ResXResourceSet.cs
- TextEditorCopyPaste.cs
- SrgsGrammarCompiler.cs
- FormViewModeEventArgs.cs
- ContentIterators.cs
- NativeBuffer.cs
- CustomTypeDescriptor.cs
- WebPartConnection.cs
- ContextMenuAutomationPeer.cs
- Identity.cs
- HttpProfileGroupBase.cs
- WorkflowOperationBehavior.cs
- Encoding.cs
- KnownTypeDataContractResolver.cs
- DetailsViewInsertedEventArgs.cs
- XmlExceptionHelper.cs
- EventMappingSettingsCollection.cs
- CodeDelegateInvokeExpression.cs
- MsmqIntegrationChannelListener.cs
- InvalidAsynchronousStateException.cs
- VariableQuery.cs
- Lease.cs
- ClientSession.cs
- BoundsDrawingContextWalker.cs
- StyleCollection.cs
- Nodes.cs
- Rfc2898DeriveBytes.cs
- RadioButtonStandardAdapter.cs
- SmtpTransport.cs
- VolatileEnlistmentState.cs
- MsmqBindingElementBase.cs
- TreeViewImageKeyConverter.cs
- HttpRequestCacheValidator.cs
- CompositeDataBoundControl.cs
- TagMapInfo.cs
- OletxTransactionHeader.cs
- WebPartConnectionsCloseVerb.cs
- EncodingTable.cs
- WsatConfiguration.cs
- DirectionalLight.cs
- ISessionStateStore.cs
- ProfileModule.cs
- HostSecurityManager.cs
- ServiceMetadataPublishingElement.cs
- WindowsGraphicsCacheManager.cs
- GiveFeedbackEventArgs.cs
- DateTimeParse.cs
- TypeListConverter.cs
- BaseConfigurationRecord.cs
- FSWPathEditor.cs
- EventArgs.cs
- BaseDataListActionList.cs
- StreamSecurityUpgradeAcceptorBase.cs
- DynamicPropertyReader.cs
- PKCS1MaskGenerationMethod.cs
- Rules.cs
- ServiceChannelManager.cs
- MachineKeyValidationConverter.cs
- WebDisplayNameAttribute.cs
- QuestionEventArgs.cs
- InitializationEventAttribute.cs
- StringFunctions.cs
- DecimalSumAggregationOperator.cs
- FlowDocumentView.cs
- StateMachineWorkflowDesigner.cs
- ExceptionHandlersDesigner.cs
- StringFormat.cs
- PublisherMembershipCondition.cs
- TextSelectionProcessor.cs
- _AcceptOverlappedAsyncResult.cs
- CodeThrowExceptionStatement.cs
- ValidationHelpers.cs
- SamlNameIdentifierClaimResource.cs
- Grid.cs
- Debug.cs
- CryptoConfig.cs
- TextSchema.cs