Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 1305376 / ModelPerspective.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 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 [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- iisPickupDirectory.cs
- HtmlInputHidden.cs
- DataViewSetting.cs
- httpserverutility.cs
- ProcessProtocolHandler.cs
- TdsParserSafeHandles.cs
- TemplateBindingExtension.cs
- XamlReader.cs
- DiffuseMaterial.cs
- RegionInfo.cs
- DatagramAdapter.cs
- EllipticalNodeOperations.cs
- Stream.cs
- RowToFieldTransformer.cs
- NativeMethods.cs
- SelectingProviderEventArgs.cs
- PeerContact.cs
- Drawing.cs
- Property.cs
- datacache.cs
- MatrixStack.cs
- MembershipSection.cs
- FragmentQueryKB.cs
- UnsafeNativeMethods.cs
- NameScopePropertyAttribute.cs
- WindowsPen.cs
- CreateInstanceBinder.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- RectIndependentAnimationStorage.cs
- Solver.cs
- RandomDelaySendsAsyncResult.cs
- StackBuilderSink.cs
- EventProviderWriter.cs
- CapabilitiesRule.cs
- ParallelTimeline.cs
- ObjectQuery.cs
- RecognizedWordUnit.cs
- HandlerBase.cs
- MetabaseSettingsIis7.cs
- ValidatorCollection.cs
- VariableAction.cs
- XPathSelectionIterator.cs
- HasCopySemanticsAttribute.cs
- EntitySqlQueryState.cs
- ImageListImage.cs
- XmlStreamStore.cs
- InfoCardKeyedHashAlgorithm.cs
- TaskFileService.cs
- ThicknessAnimationUsingKeyFrames.cs
- SecureEnvironment.cs
- DebugView.cs
- CodeTryCatchFinallyStatement.cs
- CheckBox.cs
- UnsupportedPolicyOptionsException.cs
- Model3D.cs
- XmlTextReader.cs
- Errors.cs
- DSASignatureDeformatter.cs
- filewebrequest.cs
- FaultException.cs
- ListViewSelectEventArgs.cs
- TaskFormBase.cs
- Base64Stream.cs
- FixUpCollection.cs
- TextProperties.cs
- SimpleApplicationHost.cs
- OdbcEnvironmentHandle.cs
- ConfigurationConverterBase.cs
- ForeignConstraint.cs
- Rect.cs
- SimpleTypeResolver.cs
- SoapInteropTypes.cs
- TableLayoutSettingsTypeConverter.cs
- KeySpline.cs
- DrawListViewSubItemEventArgs.cs
- ConfigUtil.cs
- NavigationFailedEventArgs.cs
- CrossAppDomainChannel.cs
- SqlDataSourceConnectionPanel.cs
- XmlSerializationReader.cs
- CatalogZoneAutoFormat.cs
- _Win32.cs
- GPRECT.cs
- SimpleWorkerRequest.cs
- CryptographicAttribute.cs
- Utils.cs
- TransactionFlowElement.cs
- DispatcherOperation.cs
- SchemaMerger.cs
- Polyline.cs
- ResourceManagerWrapper.cs
- XmlArrayAttribute.cs
- DesignerUtility.cs
- MetadataExchangeBindings.cs
- DataRowComparer.cs
- PageBuildProvider.cs
- EmptyArray.cs
- LinkedDataMemberFieldEditor.cs
- BitmapEffectGroup.cs
- AvTraceDetails.cs