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
- VoiceChangeEventArgs.cs
- ClientTarget.cs
- DesignerAdapterAttribute.cs
- AbstractDataSvcMapFileLoader.cs
- PriorityRange.cs
- FixedPageStructure.cs
- ActivityWithResult.cs
- AssemblyAssociatedContentFileAttribute.cs
- NativeCppClassAttribute.cs
- TextEditor.cs
- XPathBinder.cs
- DeclaredTypeValidator.cs
- Util.cs
- SmtpTransport.cs
- AdjustableArrowCap.cs
- ElementNotEnabledException.cs
- AuthenticationSection.cs
- MarkupCompilePass1.cs
- TextSimpleMarkerProperties.cs
- ComplexType.cs
- DbgCompiler.cs
- Control.cs
- DurationConverter.cs
- EntityClassGenerator.cs
- SamlDelegatingWriter.cs
- AdRotatorDesigner.cs
- DbConvert.cs
- VisualBrush.cs
- Facet.cs
- ToolStripContextMenu.cs
- HttpListenerElement.cs
- EventProviderWriter.cs
- XmlSchemaSet.cs
- AlphabetConverter.cs
- TypeConstant.cs
- DiscoveryClientProtocol.cs
- CodeGenerator.cs
- InfocardClientCredentials.cs
- HtmlInputImage.cs
- ProfilePropertySettings.cs
- XmlDataFileEditor.cs
- Model3DGroup.cs
- DiscreteKeyFrames.cs
- _StreamFramer.cs
- AbandonedMutexException.cs
- lengthconverter.cs
- CornerRadiusConverter.cs
- ClientUrlResolverWrapper.cs
- BitmapEffectGeneralTransform.cs
- WebExceptionStatus.cs
- InputScopeAttribute.cs
- BitmapMetadataBlob.cs
- CanonicalFontFamilyReference.cs
- Closure.cs
- ClientUIRequest.cs
- ProcessThread.cs
- SqlEnums.cs
- SafeMarshalContext.cs
- SelectionEditingBehavior.cs
- NegotiateStream.cs
- TextTreeText.cs
- _SpnDictionary.cs
- TreeNodeStyleCollectionEditor.cs
- DateBoldEvent.cs
- CharStorage.cs
- HtmlTernaryTree.cs
- WinCategoryAttribute.cs
- WebPartEventArgs.cs
- MexNamedPipeBindingElement.cs
- ReadOnlyDataSource.cs
- PixelShader.cs
- EntityTemplateFactory.cs
- Attributes.cs
- PropertyRecord.cs
- ViewKeyConstraint.cs
- CryptoApi.cs
- RelOps.cs
- DSACryptoServiceProvider.cs
- XmlArrayAttribute.cs
- PackageFilter.cs
- ObjectListSelectEventArgs.cs
- PersonalizationProvider.cs
- CodeAttributeDeclarationCollection.cs
- Range.cs
- SchemaCompiler.cs
- CmsInterop.cs
- PropertyDescriptorCollection.cs
- ContextStaticAttribute.cs
- HiddenField.cs
- Geometry3D.cs
- WebPartEditorCancelVerb.cs
- StylusPointDescription.cs
- RangeValidator.cs
- ClaimComparer.cs
- ToolStripItemTextRenderEventArgs.cs
- InlineUIContainer.cs
- DefaultBindingPropertyAttribute.cs
- HostedImpersonationContext.cs
- CustomError.cs
- ProviderSettings.cs