Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- // // 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
- BevelBitmapEffect.cs
- DataFormat.cs
- ToolStripOverflowButton.cs
- EventOpcode.cs
- CollectionChangeEventArgs.cs
- HorizontalAlignConverter.cs
- XhtmlBasicFormAdapter.cs
- FloatUtil.cs
- DynamicResourceExtensionConverter.cs
- ControlEvent.cs
- BidirectionalDictionary.cs
- QualifiedCellIdBoolean.cs
- HtmlInputCheckBox.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- SchemaContext.cs
- GenericPrincipal.cs
- BinaryConverter.cs
- Vector3DCollectionConverter.cs
- ExpressionBuilder.cs
- PersistenceProviderBehavior.cs
- _HeaderInfoTable.cs
- RequestSecurityTokenResponseCollection.cs
- PageEventArgs.cs
- ImageSourceConverter.cs
- ActivityTypeCodeDomSerializer.cs
- ZipIOCentralDirectoryBlock.cs
- PreservationFileReader.cs
- WeakEventTable.cs
- ApplicationFileParser.cs
- NotifyInputEventArgs.cs
- IUnknownConstantAttribute.cs
- AlignmentYValidation.cs
- basenumberconverter.cs
- InvalidCommandTreeException.cs
- MimePart.cs
- MetabaseServerConfig.cs
- XNodeValidator.cs
- ServiceContractAttribute.cs
- DocumentViewer.cs
- Configuration.cs
- UIntPtr.cs
- DataRelation.cs
- JumpList.cs
- ModuleBuilderData.cs
- Variable.cs
- LambdaCompiler.Address.cs
- TreeViewItem.cs
- Line.cs
- NameSpaceEvent.cs
- querybuilder.cs
- BoundField.cs
- CategoryAttribute.cs
- DebugInfoExpression.cs
- MetadataFile.cs
- GroupBoxAutomationPeer.cs
- PropagatorResult.cs
- TransformFinalBlockRequest.cs
- PriorityRange.cs
- OutArgumentConverter.cs
- DesignerObject.cs
- BaseAsyncResult.cs
- HMACRIPEMD160.cs
- AutoResetEvent.cs
- ErrorHandlingAcceptor.cs
- GridPatternIdentifiers.cs
- ProxyWebPartManagerDesigner.cs
- WebPartCloseVerb.cs
- HttpCacheParams.cs
- SimpleMailWebEventProvider.cs
- LinqDataSourceContextEventArgs.cs
- SQLInt16Storage.cs
- TemplateInstanceAttribute.cs
- RequestCache.cs
- RemotingConfiguration.cs
- ViewKeyConstraint.cs
- BoolLiteral.cs
- ModifierKeysConverter.cs
- DataGridViewRowCollection.cs
- FamilyMap.cs
- SocketElement.cs
- VsPropertyGrid.cs
- DataGridViewDataConnection.cs
- JsonServiceDocumentSerializer.cs
- ArcSegment.cs
- PathSegmentCollection.cs
- ProcessInputEventArgs.cs
- Authorization.cs
- ExtensionElement.cs
- ArgumentValue.cs
- CmsInterop.cs
- SoapEnumAttribute.cs
- CreateUserWizardDesigner.cs
- BulletedList.cs
- SQLBinaryStorage.cs
- AllMembershipCondition.cs
- TransactionInformation.cs
- WindowsClientElement.cs
- FamilyTypeface.cs
- XhtmlBasicPhoneCallAdapter.cs
- XmlSerializerFactory.cs