Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 2 / 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
- MimeXmlReflector.cs
- IgnoreSection.cs
- SoapServerMethod.cs
- OutputCacheProfile.cs
- MethodAccessException.cs
- ListItem.cs
- StrongNameHelpers.cs
- CustomAttributeSerializer.cs
- ConfigurationSchemaErrors.cs
- ComplexType.cs
- DataPagerField.cs
- ImageList.cs
- TagMapInfo.cs
- StringUtil.cs
- StylusButtonCollection.cs
- TCPClient.cs
- NotifyParentPropertyAttribute.cs
- EntityProviderServices.cs
- FunctionParameter.cs
- ToolStripOverflowButton.cs
- RequestResizeEvent.cs
- NullableDecimalMinMaxAggregationOperator.cs
- DataGridViewRowEventArgs.cs
- Rect.cs
- SctClaimDictionary.cs
- XamlPointCollectionSerializer.cs
- MarginsConverter.cs
- GeneralTransformCollection.cs
- DataGridViewTopLeftHeaderCell.cs
- Package.cs
- Stack.cs
- ChameleonKey.cs
- StreamInfo.cs
- EntityDataSourceReferenceGroup.cs
- BoolExpr.cs
- MetadataArtifactLoaderFile.cs
- DataControlButton.cs
- DefaultProfileManager.cs
- PageParser.cs
- FormParameter.cs
- DeploymentSection.cs
- BaseCodePageEncoding.cs
- LinqDataSourceDisposeEventArgs.cs
- WmpBitmapEncoder.cs
- PeerContact.cs
- AddressAccessDeniedException.cs
- MemoryStream.cs
- TypeBuilder.cs
- RemoteHelper.cs
- SiteMapNode.cs
- Gdiplus.cs
- InstanceOwnerException.cs
- FlowDocument.cs
- SqlCacheDependencyDatabase.cs
- DataSourceCollectionBase.cs
- ToolboxItemLoader.cs
- XmlQueryCardinality.cs
- DbDataReader.cs
- XmlToDatasetMap.cs
- RoleManagerModule.cs
- _HeaderInfo.cs
- XsdBuilder.cs
- FamilyMapCollection.cs
- SoapSchemaMember.cs
- Crypto.cs
- SecurityIdentifierConverter.cs
- HttpStreamMessageEncoderFactory.cs
- httpapplicationstate.cs
- ProtocolsConfigurationEntry.cs
- AspCompat.cs
- ExpressionVisitor.cs
- TableColumnCollectionInternal.cs
- FunctionDetailsReader.cs
- ExceptionUtility.cs
- _UriTypeConverter.cs
- SafeNativeMethods.cs
- TreeViewCancelEvent.cs
- WebBaseEventKeyComparer.cs
- XsdDataContractExporter.cs
- ChannelOptions.cs
- QuadraticBezierSegment.cs
- SourceFilter.cs
- ToggleButton.cs
- ResourceReader.cs
- RunInstallerAttribute.cs
- OleCmdHelper.cs
- ValueTypeFixupInfo.cs
- ContainerControlDesigner.cs
- NavigationExpr.cs
- KeyValuePairs.cs
- _HelperAsyncResults.cs
- PrtCap_Public_Simple.cs
- CodeObject.cs
- Wildcard.cs
- ClientTargetSection.cs
- VolatileResourceManager.cs
- SecurityKeyUsage.cs
- Serializer.cs
- SendDesigner.xaml.cs
- _SingleItemRequestCache.cs