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
- ImageInfo.cs
- StylusDevice.cs
- CodeFieldReferenceExpression.cs
- QilBinary.cs
- DSASignatureDeformatter.cs
- Bold.cs
- CurrencyWrapper.cs
- Crypto.cs
- WrappingXamlSchemaContext.cs
- MatrixTransform.cs
- RegexCompilationInfo.cs
- MergeLocalizationDirectives.cs
- RandomDelayQueuedSendsAsyncResult.cs
- DbProviderServices.cs
- OverlappedContext.cs
- SqlGatherConsumedAliases.cs
- OracleTransaction.cs
- ModelChangedEventArgsImpl.cs
- RealProxy.cs
- StagingAreaInputItem.cs
- DbModificationCommandTree.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ValidationPropertyAttribute.cs
- Vector.cs
- DictionaryKeyPropertyAttribute.cs
- XmlWriterSettings.cs
- GridViewUpdateEventArgs.cs
- DurableInstanceProvider.cs
- Selection.cs
- MonikerSyntaxException.cs
- ThumbButtonInfoCollection.cs
- CommandBinding.cs
- XPathScanner.cs
- AssemblyCache.cs
- CompilerInfo.cs
- DebugHandleTracker.cs
- odbcmetadatafactory.cs
- RC2.cs
- SchemaEntity.cs
- CompatibleComparer.cs
- OracleParameterCollection.cs
- Emitter.cs
- LineSegment.cs
- UIPermission.cs
- AccessedThroughPropertyAttribute.cs
- RequestNavigateEventArgs.cs
- ListViewDeletedEventArgs.cs
- MarkupCompiler.cs
- PolicyManager.cs
- GridViewUpdatedEventArgs.cs
- KoreanCalendar.cs
- DeploymentSectionCache.cs
- PathBox.cs
- IRCollection.cs
- VersionPair.cs
- DesignerActionListCollection.cs
- BaseDataBoundControl.cs
- TemplateDefinition.cs
- ProfileSettings.cs
- XmlAutoDetectWriter.cs
- OrderablePartitioner.cs
- LeaseManager.cs
- FixedSOMContainer.cs
- WebServiceHostFactory.cs
- UriWriter.cs
- InternalConfigRoot.cs
- DropTarget.cs
- Encoder.cs
- TextBoxBase.cs
- RenamedEventArgs.cs
- FileChangesMonitor.cs
- ResponseStream.cs
- BooleanToVisibilityConverter.cs
- EntityContainerEmitter.cs
- PublisherMembershipCondition.cs
- XmlFormatExtensionPointAttribute.cs
- WindowsListViewSubItem.cs
- GC.cs
- StdRegProviderWrapper.cs
- PageThemeBuildProvider.cs
- SqlTypeSystemProvider.cs
- Mapping.cs
- WebConfigurationHost.cs
- UInt16Storage.cs
- WebPartsPersonalization.cs
- InsufficientExecutionStackException.cs
- IProvider.cs
- SafeNativeHandle.cs
- ColorDialog.cs
- SolidColorBrush.cs
- DataGridViewTextBoxColumn.cs
- Drawing.cs
- DataBindingHandlerAttribute.cs
- smtpconnection.cs
- WorkerRequest.cs
- Control.cs
- EmbeddedMailObjectsCollection.cs
- BasicCellRelation.cs
- EnumerableCollectionView.cs
- SetStoryboardSpeedRatio.cs