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
- TargetParameterCountException.cs
- PreviewPrintController.cs
- FontFamilyValueSerializer.cs
- WebPartManager.cs
- TextAnchor.cs
- ExtensionWindowResizeGrip.cs
- PkcsMisc.cs
- SymbolUsageManager.cs
- WebPartCatalogAddVerb.cs
- cookieexception.cs
- SchemaElementDecl.cs
- DataGridViewBand.cs
- CoTaskMemUnicodeSafeHandle.cs
- DomainUpDown.cs
- WebPartTransformer.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- ColumnMap.cs
- ResXResourceWriter.cs
- XPathParser.cs
- CommandHelpers.cs
- XmlSchemaGroup.cs
- MenuBase.cs
- PositiveTimeSpanValidator.cs
- NetworkCredential.cs
- DrawListViewColumnHeaderEventArgs.cs
- SoapWriter.cs
- FixedLineResult.cs
- DataSet.cs
- MissingFieldException.cs
- UInt16.cs
- LookupBindingPropertiesAttribute.cs
- ColumnResizeAdorner.cs
- infer.cs
- HttpListenerPrefixCollection.cs
- XPathDocumentBuilder.cs
- cookieexception.cs
- TypographyProperties.cs
- _NtlmClient.cs
- ObjectConverter.cs
- WindowsRichEditRange.cs
- DataGridSortingEventArgs.cs
- InfiniteTimeSpanConverter.cs
- SubclassTypeValidatorAttribute.cs
- ChildrenQuery.cs
- XamlStream.cs
- MultiBindingExpression.cs
- FieldToken.cs
- StylusEditingBehavior.cs
- VectorAnimationUsingKeyFrames.cs
- GestureRecognizer.cs
- ImportOptions.cs
- Transform.cs
- PageContent.cs
- ComboBox.cs
- ReadOnlyCollectionBase.cs
- SelectionWordBreaker.cs
- GridViewPageEventArgs.cs
- UnitySerializationHolder.cs
- RegularExpressionValidator.cs
- LockedHandleGlyph.cs
- DriveNotFoundException.cs
- DefaultTextStore.cs
- ScrollProperties.cs
- RedirectionProxy.cs
- PolicyImporterElementCollection.cs
- Point3D.cs
- RectAnimationUsingKeyFrames.cs
- PasswordRecovery.cs
- InputScope.cs
- BookmarkScopeManager.cs
- CommandEventArgs.cs
- Exception.cs
- BuildManagerHost.cs
- FontFaceLayoutInfo.cs
- NavigateEvent.cs
- Substitution.cs
- AuthenticatedStream.cs
- OleDbConnectionFactory.cs
- ListViewDataItem.cs
- LinqExpressionNormalizer.cs
- ListChangedEventArgs.cs
- CalloutQueueItem.cs
- RSACryptoServiceProvider.cs
- TemplatePartAttribute.cs
- Brush.cs
- AndCondition.cs
- SqlParameterizer.cs
- HandledEventArgs.cs
- Viewport3DAutomationPeer.cs
- DelayedRegex.cs
- Block.cs
- ToolStripDropDownItem.cs
- DataGrid.cs
- DataGridViewImageColumn.cs
- HttpWebRequestElement.cs
- ServiceSecurityAuditElement.cs
- MethodExpr.cs
- ClonableStack.cs
- IERequestCache.cs
- Brush.cs