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
- SchemaInfo.cs
- Attachment.cs
- WebPartExportVerb.cs
- FontClient.cs
- PasswordPropertyTextAttribute.cs
- EllipseGeometry.cs
- RIPEMD160.cs
- BufferBuilder.cs
- Schema.cs
- QuotedPrintableStream.cs
- CompilationPass2Task.cs
- SqlDataSourceParameterParser.cs
- WhiteSpaceTrimStringConverter.cs
- GetMemberBinder.cs
- ConfigurationValidatorBase.cs
- ResourceDescriptionAttribute.cs
- RoleExceptions.cs
- SelectionHighlightInfo.cs
- CodeParameterDeclarationExpression.cs
- TraceSwitch.cs
- DataGridViewCellValueEventArgs.cs
- SchemaNames.cs
- ImageEditor.cs
- XmlNavigatorStack.cs
- SafeHandle.cs
- XmlQueryStaticData.cs
- RuleSettingsCollection.cs
- TrustLevel.cs
- CDSCollectionETWBCLProvider.cs
- RunInstallerAttribute.cs
- PageAction.cs
- ArrangedElement.cs
- TimeoutValidationAttribute.cs
- ASCIIEncoding.cs
- FileEnumerator.cs
- ParamArrayAttribute.cs
- WebConvert.cs
- CryptoApi.cs
- TextRangeEditLists.cs
- DockProviderWrapper.cs
- OutputCacheSettings.cs
- XDRSchema.cs
- HtmlInputHidden.cs
- XmlSchemaChoice.cs
- NamedElement.cs
- FamilyTypefaceCollection.cs
- Validator.cs
- DataViewManagerListItemTypeDescriptor.cs
- DecimalAnimation.cs
- IdentifierService.cs
- FileUtil.cs
- HeaderCollection.cs
- HotCommands.cs
- SmtpNetworkElement.cs
- TextSearch.cs
- SafeThreadHandle.cs
- Converter.cs
- RoleManagerSection.cs
- M3DUtil.cs
- PatternMatcher.cs
- AmbientProperties.cs
- InvalidPropValue.cs
- PersistChildrenAttribute.cs
- ImageCodecInfo.cs
- IndentedTextWriter.cs
- XPathNodeIterator.cs
- CodeMemberField.cs
- ContextQuery.cs
- NewExpression.cs
- TransportBindingElementImporter.cs
- PromptEventArgs.cs
- SlipBehavior.cs
- RayHitTestParameters.cs
- DependencyObjectCodeDomSerializer.cs
- CodeSnippetStatement.cs
- TypeLoadException.cs
- DataListItem.cs
- Package.cs
- METAHEADER.cs
- SqlClientMetaDataCollectionNames.cs
- OutputCacheSettings.cs
- DependencyObject.cs
- altserialization.cs
- MasterPageCodeDomTreeGenerator.cs
- Geometry3D.cs
- PenContexts.cs
- TransactionOptions.cs
- DNS.cs
- ObjectDataSourceView.cs
- ObjectDataSource.cs
- Popup.cs
- SecurityValidationBehavior.cs
- SqlNodeTypeOperators.cs
- ConfigurationSection.cs
- GradientBrush.cs
- HttpException.cs
- AvTrace.cs
- StylusPointPropertyUnit.cs
- TcpClientCredentialType.cs
- OperatorExpressions.cs