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
- Axis.cs
- EventDescriptorCollection.cs
- CoreSwitches.cs
- EndpointDiscoveryBehavior.cs
- DependencyObjectProvider.cs
- VerificationAttribute.cs
- TextParagraph.cs
- ValueChangedEventManager.cs
- DefaultDiscoveryServiceExtension.cs
- ClientSettings.cs
- ListComponentEditorPage.cs
- ReadOnlyTernaryTree.cs
- ContentFileHelper.cs
- TdsParser.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- Control.cs
- ExpressionWriter.cs
- ContainerControlDesigner.cs
- WebPartDisplayModeCancelEventArgs.cs
- EventProxy.cs
- TextFindEngine.cs
- SecurityDocument.cs
- metadatamappinghashervisitor.cs
- Point3DValueSerializer.cs
- GlobalProxySelection.cs
- DetailsViewPagerRow.cs
- Opcode.cs
- CodeDefaultValueExpression.cs
- WebRequest.cs
- BaseParser.cs
- PrintingPermissionAttribute.cs
- NetPipeSection.cs
- StorageInfo.cs
- DataSvcMapFile.cs
- CodeIndexerExpression.cs
- ObjectQueryExecutionPlan.cs
- AttributeEmitter.cs
- DataGridViewComponentPropertyGridSite.cs
- FileDialogCustomPlacesCollection.cs
- MediaPlayerState.cs
- TreeNodeStyle.cs
- ModulesEntry.cs
- PageContentCollection.cs
- WindowPattern.cs
- CFGGrammar.cs
- COM2ExtendedTypeConverter.cs
- BamlLocalizationDictionary.cs
- InfoCardHelper.cs
- Base64Decoder.cs
- ConfigurationSchemaErrors.cs
- RangeValidator.cs
- BezierSegment.cs
- EventLogger.cs
- X509Certificate.cs
- TypeConverterValueSerializer.cs
- EnterpriseServicesHelper.cs
- XmlMembersMapping.cs
- DNS.cs
- AuthenticationModuleElement.cs
- SourceFileBuildProvider.cs
- AuthorizationRule.cs
- AppDomainProtocolHandler.cs
- ListViewDeletedEventArgs.cs
- TypeHelpers.cs
- SpeechUI.cs
- Rule.cs
- ToolStripContentPanel.cs
- StreamReader.cs
- ZipPackagePart.cs
- PersonalizableTypeEntry.cs
- XmlSchemaDatatype.cs
- AnimatedTypeHelpers.cs
- OptimalTextSource.cs
- WebPermission.cs
- SecurityDocument.cs
- ConfigurationSettings.cs
- InterleavedZipPartStream.cs
- UriExt.cs
- XamlValidatingReader.cs
- StyleCollection.cs
- BitmapFrame.cs
- XmlSerializerFactory.cs
- TypefaceMap.cs
- PostBackOptions.cs
- OleDbRowUpdatingEvent.cs
- EditingScope.cs
- XmlEnumAttribute.cs
- PropertyFilterAttribute.cs
- ThemeDirectoryCompiler.cs
- Schema.cs
- MimeXmlReflector.cs
- ReceiveDesigner.xaml.cs
- WebControl.cs
- PreservationFileReader.cs
- BindValidationContext.cs
- EllipseGeometry.cs
- XmlSchemaCompilationSettings.cs
- ReservationCollection.cs
- TimeSpanParse.cs
- DesignerOptionService.cs