Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 1 / ModelPerspective.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 ModelPerspective : Perspective { #region Contructors ////// Creates a new instance of perspective class so that query can work /// ignorant of all spaces /// /// runtime metadata container internal ModelPerspective(MetadataWorkspace metadataWorkspace) : base(metadataWorkspace, DataSpace.CSpace) { } #endregion #region Methods ////// Look up a type in the target data space based upon the fullName /// /// fullName /// true for case-insensitive lookup /// The type usage object to return ///True if the retrieval succeeded internal override bool TryGetTypeByName(string fullName, bool ignoreCase, out TypeUsage typeUsage ) { EntityUtil.CheckStringArgument(fullName, "fullName"); typeUsage = null; EdmType edmType = null; if (this.MetadataWorkspace.TryGetItem(fullName, ignoreCase, this.TargetDataspace, out edmType)) { if (Helper.IsPrimitiveType(edmType)) { typeUsage = this.MetadataWorkspace.GetCanonicalModelTypeUsage(((PrimitiveType)edmType).PrimitiveTypeKind); } else { typeUsage = TypeUsage.Create(edmType); } } return typeUsage != null; } #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 ModelPerspective : Perspective { #region Contructors ////// Creates a new instance of perspective class so that query can work /// ignorant of all spaces /// /// runtime metadata container internal ModelPerspective(MetadataWorkspace metadataWorkspace) : base(metadataWorkspace, DataSpace.CSpace) { } #endregion #region Methods ////// Look up a type in the target data space based upon the fullName /// /// fullName /// true for case-insensitive lookup /// The type usage object to return ///True if the retrieval succeeded internal override bool TryGetTypeByName(string fullName, bool ignoreCase, out TypeUsage typeUsage ) { EntityUtil.CheckStringArgument(fullName, "fullName"); typeUsage = null; EdmType edmType = null; if (this.MetadataWorkspace.TryGetItem(fullName, ignoreCase, this.TargetDataspace, out edmType)) { if (Helper.IsPrimitiveType(edmType)) { typeUsage = this.MetadataWorkspace.GetCanonicalModelTypeUsage(((PrimitiveType)edmType).PrimitiveTypeKind); } else { typeUsage = TypeUsage.Create(edmType); } } return typeUsage != null; } #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
- DiscoveryReferences.cs
- DoubleAnimationBase.cs
- CounterSampleCalculator.cs
- GlobalProxySelection.cs
- TransactionTraceIdentifier.cs
- HGlobalSafeHandle.cs
- ImportContext.cs
- MimeMultiPart.cs
- SQLDouble.cs
- PropertyToken.cs
- PixelShader.cs
- System.Data_BID.cs
- TraceHandler.cs
- EventLogEntryCollection.cs
- WmlLinkAdapter.cs
- ListViewAutomationPeer.cs
- CodeParameterDeclarationExpressionCollection.cs
- PresentationTraceSources.cs
- XPathExpr.cs
- OracleDataReader.cs
- Vars.cs
- bidPrivateBase.cs
- SuspendDesigner.cs
- DomainLiteralReader.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ImageSourceConverter.cs
- EnumConverter.cs
- mactripleDES.cs
- RegexTree.cs
- Stylus.cs
- LifetimeManager.cs
- RevocationPoint.cs
- GroupBox.cs
- AssociationSetMetadata.cs
- InternalCache.cs
- Color.cs
- NullableBoolConverter.cs
- BaseDataListDesigner.cs
- XmlDataCollection.cs
- ParameterToken.cs
- ListMarkerSourceInfo.cs
- ModelTreeManager.cs
- SmtpCommands.cs
- PointAnimationClockResource.cs
- TimerElapsedEvenArgs.cs
- OleDbMetaDataFactory.cs
- ScrollItemPatternIdentifiers.cs
- XmlQueryTypeFactory.cs
- AccessDataSourceView.cs
- MessageBox.cs
- BitmapFrameEncode.cs
- Table.cs
- SystemShuttingDownException.cs
- LogicalExpr.cs
- WebPartConnectionCollection.cs
- Point3DKeyFrameCollection.cs
- ContactManager.cs
- UrlParameterReader.cs
- XmlSchemaProviderAttribute.cs
- BaseTemplateBuildProvider.cs
- RealizedColumnsBlock.cs
- RecordsAffectedEventArgs.cs
- TreeNodeBindingCollection.cs
- IntegerFacetDescriptionElement.cs
- HttpHandler.cs
- WebEventTraceProvider.cs
- BuildManager.cs
- DbXmlEnabledProviderManifest.cs
- Size3D.cs
- MailHeaderInfo.cs
- HttpPostProtocolReflector.cs
- HwndSourceKeyboardInputSite.cs
- XmlRootAttribute.cs
- SemanticTag.cs
- QueryInterceptorAttribute.cs
- CompositionDesigner.cs
- VerticalAlignConverter.cs
- Component.cs
- InfoCardKeyedHashAlgorithm.cs
- MenuItem.cs
- RangeBaseAutomationPeer.cs
- CommandHelper.cs
- FillErrorEventArgs.cs
- FileAuthorizationModule.cs
- TextParaClient.cs
- MethodExpr.cs
- DetailsViewRow.cs
- NotFiniteNumberException.cs
- StsCommunicationException.cs
- SmiMetaDataProperty.cs
- DetailsViewRowCollection.cs
- ComponentChangedEvent.cs
- QueryOptionExpression.cs
- VisualTreeHelper.cs
- FixedSOMPage.cs
- GetPageCompletedEventArgs.cs
- Asn1IntegerConverter.cs
- OciLobLocator.cs
- DataGridViewElement.cs
- ParentControlDesigner.cs