Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / TargetPerspective.cs / 1 / 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
- Triangle.cs
- KeyedCollection.cs
- HtmlHistory.cs
- NamespaceEmitter.cs
- BindingMemberInfo.cs
- StringPropertyBuilder.cs
- SqlDataRecord.cs
- WebPermission.cs
- TemplateAction.cs
- MonthChangedEventArgs.cs
- ToolStripScrollButton.cs
- GridViewRowPresenter.cs
- UpDownEvent.cs
- Parameter.cs
- Encoder.cs
- EndpointReference.cs
- X509SecurityTokenParameters.cs
- TextServicesCompartment.cs
- DefaultBinder.cs
- Transform3DGroup.cs
- CryptoApi.cs
- DateTimeOffsetStorage.cs
- AppearanceEditorPart.cs
- CqlParser.cs
- SqlDataSourceCommandEventArgs.cs
- DashStyles.cs
- AppSettingsExpressionBuilder.cs
- SQLInt64Storage.cs
- Stroke.cs
- DesignerLoader.cs
- BindingGraph.cs
- GridViewColumn.cs
- GifBitmapEncoder.cs
- CompiledRegexRunner.cs
- NameTable.cs
- precedingsibling.cs
- MetadataImporterQuotas.cs
- StylusEventArgs.cs
- QilGeneratorEnv.cs
- WSIdentityFaultException.cs
- ExceptionUtility.cs
- XmlText.cs
- MenuAdapter.cs
- EntityConnection.cs
- Grid.cs
- Underline.cs
- ConnectionPoolManager.cs
- ArraySet.cs
- TrustLevelCollection.cs
- nulltextnavigator.cs
- WorkflowMessageEventHandler.cs
- SiteMapNodeCollection.cs
- ActiveXHelper.cs
- ParseHttpDate.cs
- SystemResources.cs
- Parser.cs
- PropertyMap.cs
- CompressEmulationStream.cs
- PeerIPHelper.cs
- ComponentConverter.cs
- SecurityTokenTypes.cs
- GeometryModel3D.cs
- ImageCodecInfoPrivate.cs
- TreeViewCancelEvent.cs
- UmAlQuraCalendar.cs
- PermissionSetEnumerator.cs
- ClientReliableChannelBinder.cs
- ScriptingRoleServiceSection.cs
- DataSourceUtil.cs
- BitmapMetadata.cs
- CloseCollectionAsyncResult.cs
- XpsS0ValidatingLoader.cs
- ServiceDescriptionData.cs
- WhileDesigner.cs
- XsdDuration.cs
- TypeName.cs
- AuthenticationManager.cs
- ConfigurationManager.cs
- CngProperty.cs
- TableRowGroup.cs
- TextParagraph.cs
- DataGridPreparingCellForEditEventArgs.cs
- CursorInteropHelper.cs
- CompleteWizardStep.cs
- StylusPointProperties.cs
- XmlParserContext.cs
- TextSearch.cs
- ConfigXmlText.cs
- RadioButtonAutomationPeer.cs
- EntityProviderFactory.cs
- TemplateApplicationHelper.cs
- BuildProviderCollection.cs
- MenuItemBindingCollection.cs
- CollectionContainer.cs
- SerialPinChanges.cs
- StdRegProviderWrapper.cs
- PingOptions.cs
- DataGridViewTextBoxEditingControl.cs
- DetailsViewDeleteEventArgs.cs
- _ContextAwareResult.cs