Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / TargetPerspective.cs / 3 / 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
- CloseCollectionAsyncResult.cs
- SystemUnicastIPAddressInformation.cs
- NonVisualControlAttribute.cs
- NativeMethodsCLR.cs
- DataRowCollection.cs
- InfoCardHelper.cs
- SimpleApplicationHost.cs
- XPathAxisIterator.cs
- OutputCache.cs
- CodeDirectiveCollection.cs
- ApplicationInterop.cs
- HtmlElement.cs
- EventItfInfo.cs
- FunctionQuery.cs
- SQLDecimal.cs
- PageTextBox.cs
- ProfileProvider.cs
- CachedBitmap.cs
- CompilerScopeManager.cs
- DataGridViewTextBoxEditingControl.cs
- Win32MouseDevice.cs
- AudienceUriMode.cs
- GeometryDrawing.cs
- FixedDSBuilder.cs
- RefreshEventArgs.cs
- DrawingContextDrawingContextWalker.cs
- diagnosticsswitches.cs
- MatrixTransform3D.cs
- ValidationHelpers.cs
- Debugger.cs
- BufferBuilder.cs
- NamespaceList.cs
- TextDecorationLocationValidation.cs
- Rotation3DAnimationBase.cs
- StreamResourceInfo.cs
- SupportsEventValidationAttribute.cs
- Decorator.cs
- UriExt.cs
- PointF.cs
- AbandonedMutexException.cs
- StrongNamePublicKeyBlob.cs
- FamilyTypefaceCollection.cs
- StandardTransformFactory.cs
- DataSetViewSchema.cs
- MultiByteCodec.cs
- ToolStripGripRenderEventArgs.cs
- ValueSerializerAttribute.cs
- XmlMemberMapping.cs
- MultiSelectRootGridEntry.cs
- CellParagraph.cs
- TextSimpleMarkerProperties.cs
- NetCodeGroup.cs
- AliasExpr.cs
- Tokenizer.cs
- WizardSideBarListControlItemEventArgs.cs
- MainMenu.cs
- DebugController.cs
- KnownColorTable.cs
- Stopwatch.cs
- ToolStripSystemRenderer.cs
- ping.cs
- ScaleTransform.cs
- SiteMembershipCondition.cs
- ExpressionBindings.cs
- PngBitmapDecoder.cs
- TypeUtil.cs
- JournalEntry.cs
- InstanceView.cs
- URLIdentityPermission.cs
- MetadataAssemblyHelper.cs
- DataTableClearEvent.cs
- DomNameTable.cs
- QuaternionAnimation.cs
- BuildManager.cs
- SupportingTokenParameters.cs
- SoapClientMessage.cs
- PageAdapter.cs
- ExitEventArgs.cs
- TimerTable.cs
- DbMetaDataCollectionNames.cs
- ObjectResult.cs
- XmlDataSourceNodeDescriptor.cs
- MailDefinitionBodyFileNameEditor.cs
- Int16.cs
- EntityAdapter.cs
- UnsupportedPolicyOptionsException.cs
- XmlConvert.cs
- IWorkflowDebuggerService.cs
- SecurityCapabilities.cs
- XmlDataContract.cs
- NoResizeHandleGlyph.cs
- MatrixTransform.cs
- SAPICategories.cs
- Package.cs
- ObjectDataSourceStatusEventArgs.cs
- AppSettings.cs
- RegexCapture.cs
- SchemaNotation.cs
- Utils.cs
- StringInfo.cs