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
- InternalConfigHost.cs
- SqlUserDefinedAggregateAttribute.cs
- SvcMapFileSerializer.cs
- ProfileSettingsCollection.cs
- Column.cs
- ExpressionList.cs
- ScopedMessagePartSpecification.cs
- FontWeights.cs
- ApplicationFileCodeDomTreeGenerator.cs
- PhonemeConverter.cs
- PropertyEntry.cs
- DataMisalignedException.cs
- FontNameEditor.cs
- BinaryEditor.cs
- TypeDependencyAttribute.cs
- MessageSmuggler.cs
- MultipartContentParser.cs
- ListChunk.cs
- StaticTextPointer.cs
- SrgsGrammarCompiler.cs
- ToolBarOverflowPanel.cs
- UpdateCompiler.cs
- BitmapEffect.cs
- Vector3D.cs
- Token.cs
- HttpConfigurationSystem.cs
- OverrideMode.cs
- PersianCalendar.cs
- LabelEditEvent.cs
- CodeStatementCollection.cs
- RecordBuilder.cs
- IndentTextWriter.cs
- ToolStripTemplateNode.cs
- XmlReaderSettings.cs
- SortAction.cs
- MoveSizeWinEventHandler.cs
- Column.cs
- FakeModelPropertyImpl.cs
- WindowCollection.cs
- PeerContact.cs
- _BaseOverlappedAsyncResult.cs
- MediaContext.cs
- ExpressionHelper.cs
- MarginCollapsingState.cs
- TaiwanCalendar.cs
- XmlSchemaImport.cs
- DataGridHeaderBorder.cs
- TreeIterator.cs
- ChildTable.cs
- ECDsaCng.cs
- ExtendedProtectionPolicy.cs
- DockingAttribute.cs
- SafeCryptHandles.cs
- RemoteWebConfigurationHostServer.cs
- SchemaSetCompiler.cs
- CustomCategoryAttribute.cs
- EndEvent.cs
- PolyQuadraticBezierSegment.cs
- XmlArrayItemAttribute.cs
- dtdvalidator.cs
- AdornerLayer.cs
- DbExpressionVisitor_TResultType.cs
- CultureNotFoundException.cs
- RowToFieldTransformer.cs
- ISAPIApplicationHost.cs
- JsonStringDataContract.cs
- CanonicalFontFamilyReference.cs
- ToolStripContentPanelRenderEventArgs.cs
- ItemCheckedEvent.cs
- RequestReplyCorrelator.cs
- Axis.cs
- CachedFontFace.cs
- StructuredTypeEmitter.cs
- BaseAppDomainProtocolHandler.cs
- VisualBasicSettingsHandler.cs
- ExpandSegment.cs
- OleAutBinder.cs
- ShaderEffect.cs
- GridViewDeleteEventArgs.cs
- NonParentingControl.cs
- DrawTreeNodeEventArgs.cs
- AutomationElementCollection.cs
- CaretElement.cs
- TagNameToTypeMapper.cs
- SqlUtil.cs
- NamedPipeConnectionPool.cs
- BufferedGraphicsContext.cs
- ProfileService.cs
- Matrix3DValueSerializer.cs
- MembershipSection.cs
- FacetChecker.cs
- EnterpriseServicesHelper.cs
- Vector3DValueSerializer.cs
- DefaultPrintController.cs
- RadioButtonPopupAdapter.cs
- EntityTemplateFactory.cs
- NodeFunctions.cs
- ReturnType.cs
- ObjectDataSourceSelectingEventArgs.cs
- LayoutSettings.cs