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
- IpcServerChannel.cs
- FactoryId.cs
- precedingsibling.cs
- DataGridHelper.cs
- SemaphoreFullException.cs
- ProtectedConfigurationProviderCollection.cs
- SerTrace.cs
- StrongNameKeyPair.cs
- RegexWriter.cs
- ConversionHelper.cs
- StateInitialization.cs
- Polygon.cs
- Opcode.cs
- FontStyles.cs
- XmlHierarchicalEnumerable.cs
- RtfControlWordInfo.cs
- codemethodreferenceexpression.cs
- HtmlEncodedRawTextWriter.cs
- FixedStringLookup.cs
- UInt64.cs
- XmlDocumentFragment.cs
- ThousandthOfEmRealDoubles.cs
- ConfigurationStrings.cs
- ImageKeyConverter.cs
- StringDictionaryWithComparer.cs
- WebPartCancelEventArgs.cs
- TraceContextEventArgs.cs
- ListViewDataItem.cs
- URIFormatException.cs
- XmlEntity.cs
- ReadWriteSpinLock.cs
- EndPoint.cs
- CodeVariableDeclarationStatement.cs
- SynchronizedDispatch.cs
- DataIdProcessor.cs
- DockPattern.cs
- SQLInt64.cs
- StringOutput.cs
- SamlSecurityToken.cs
- OdbcDataReader.cs
- BinaryConverter.cs
- ReflectionUtil.cs
- ToolStripContainerActionList.cs
- Calendar.cs
- BooleanStorage.cs
- Size.cs
- DictionaryContent.cs
- HandleInitializationContext.cs
- RawStylusInputCustomDataList.cs
- TypeConstant.cs
- MediaEntryAttribute.cs
- _LoggingObject.cs
- CollectionTypeElement.cs
- BaseParaClient.cs
- MeshGeometry3D.cs
- MessageBox.cs
- CodeGenerator.cs
- Transform.cs
- InstanceData.cs
- Compiler.cs
- TextEditorSpelling.cs
- FileDialogCustomPlacesCollection.cs
- ListBox.cs
- RadioButton.cs
- ButtonBaseDesigner.cs
- AttributedMetaModel.cs
- XmlNamespaceMappingCollection.cs
- SQLInt16.cs
- VScrollBar.cs
- IERequestCache.cs
- TimerEventSubscriptionCollection.cs
- CorrelationRequestContext.cs
- NamespaceInfo.cs
- Page.cs
- NumericUpDownAcceleration.cs
- SerializationStore.cs
- StateMachineDesignerPaint.cs
- Frame.cs
- PageRequestManager.cs
- AstTree.cs
- InProcStateClientManager.cs
- PaperSize.cs
- ContainerParaClient.cs
- oledbmetadatacolumnnames.cs
- XmlDataProvider.cs
- AutomationPatternInfo.cs
- FilterQuery.cs
- WizardPanel.cs
- StaticExtension.cs
- XmlSchemaImport.cs
- PlatformNotSupportedException.cs
- WindowsSolidBrush.cs
- DetailsViewInsertEventArgs.cs
- DrawListViewItemEventArgs.cs
- DrawingImage.cs
- ObjectPropertyMapping.cs
- DataGridViewToolTip.cs
- SystemIPInterfaceProperties.cs
- SafeNativeMethods.cs
- BinaryFormatterSinks.cs