Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 3 / 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
- ResourceReader.cs
- DPAPIProtectedConfigurationProvider.cs
- DataControlPagerLinkButton.cs
- EntityDataSourceView.cs
- UserPreferenceChangedEventArgs.cs
- OleDbWrapper.cs
- ListCollectionView.cs
- ToolStripComboBox.cs
- HealthMonitoringSection.cs
- NameTable.cs
- FixedSOMTableRow.cs
- ModelItemCollection.cs
- UseManagedPresentationElement.cs
- BlurEffect.cs
- Button.cs
- ToolStripContainer.cs
- PersonalizationProvider.cs
- ResourceExpressionBuilder.cs
- ProjectedWrapper.cs
- UdpDiscoveryEndpoint.cs
- MetabaseSettingsIis7.cs
- XmlEnumAttribute.cs
- DataBoundControlHelper.cs
- IndexedString.cs
- ContractNamespaceAttribute.cs
- GridViewAutoFormat.cs
- SourceInterpreter.cs
- BlockCollection.cs
- FlowDocumentReaderAutomationPeer.cs
- KerberosSecurityTokenProvider.cs
- WsatServiceAddress.cs
- MatrixConverter.cs
- UshortList2.cs
- SpecularMaterial.cs
- EntityViewGenerationAttribute.cs
- ResponseStream.cs
- AnonymousIdentificationModule.cs
- BlurEffect.cs
- MenuRendererStandards.cs
- ItemTypeToolStripMenuItem.cs
- EnglishPluralizationService.cs
- ProcessThreadCollection.cs
- ListViewSortEventArgs.cs
- Rect.cs
- TableParaClient.cs
- Properties.cs
- ProfileSettingsCollection.cs
- DataServiceExpressionVisitor.cs
- GeometryHitTestParameters.cs
- Registry.cs
- NotificationContext.cs
- DrawItemEvent.cs
- UserControlParser.cs
- NamedPipeDuplicateContext.cs
- DbProviderSpecificTypePropertyAttribute.cs
- DbMetaDataCollectionNames.cs
- XmlWellformedWriter.cs
- ConnectionStringSettings.cs
- RecordConverter.cs
- Membership.cs
- LambdaCompiler.Unary.cs
- SimpleBitVector32.cs
- SortQuery.cs
- NodeFunctions.cs
- DSACryptoServiceProvider.cs
- ResourcePool.cs
- RSAPKCS1SignatureFormatter.cs
- Color.cs
- CapabilitiesSection.cs
- OutputCacheModule.cs
- InstallerTypeAttribute.cs
- DbParameterCollectionHelper.cs
- BlockCollection.cs
- HttpRuntime.cs
- Oid.cs
- AssociationType.cs
- sqlinternaltransaction.cs
- SystemDropShadowChrome.cs
- WarningException.cs
- DataContractJsonSerializer.cs
- HostedTransportConfigurationBase.cs
- CreateUserWizard.cs
- PeerChannelFactory.cs
- DateTimeSerializationSection.cs
- EventSchemaTraceListener.cs
- TraceListener.cs
- Convert.cs
- WebPartDisplayModeEventArgs.cs
- dbdatarecord.cs
- Pair.cs
- GlyphsSerializer.cs
- ReferenceConverter.cs
- TextEndOfSegment.cs
- OleStrCAMarshaler.cs
- Msec.cs
- SchemaTypeEmitter.cs
- SystemIPv4InterfaceProperties.cs
- Util.cs
- Grammar.cs
- HealthMonitoringSection.cs