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
- VectorAnimationUsingKeyFrames.cs
- Visual3DCollection.cs
- TextProperties.cs
- XPathDocumentNavigator.cs
- MaskedTextBoxTextEditor.cs
- WeakHashtable.cs
- CustomExpression.cs
- HttpGetServerProtocol.cs
- RenameRuleObjectDialog.Designer.cs
- DataServiceException.cs
- SafeArrayTypeMismatchException.cs
- HttpListenerException.cs
- RowCache.cs
- UrlMappingsModule.cs
- HttpRequestCacheValidator.cs
- COSERVERINFO.cs
- SkipStoryboardToFill.cs
- WebZoneDesigner.cs
- CodeTypeDelegate.cs
- UnionQueryOperator.cs
- DataComponentNameHandler.cs
- CompilerErrorCollection.cs
- Verify.cs
- TabControlAutomationPeer.cs
- FormsAuthenticationConfiguration.cs
- Size.cs
- SignedXml.cs
- PersistencePipeline.cs
- Rotation3D.cs
- MultiByteCodec.cs
- TextWriterTraceListener.cs
- oledbmetadatacolumnnames.cs
- TriggerCollection.cs
- XmlNodeChangedEventArgs.cs
- ImportContext.cs
- BaseAsyncResult.cs
- StandardCommandToolStripMenuItem.cs
- DataGridViewCellStateChangedEventArgs.cs
- PropertyChangedEventManager.cs
- PerformanceCounterPermissionEntry.cs
- ListSortDescription.cs
- BlurBitmapEffect.cs
- RetrieveVirtualItemEventArgs.cs
- StringStorage.cs
- wgx_sdk_version.cs
- BindingManagerDataErrorEventArgs.cs
- RichTextBoxConstants.cs
- SqlDataSourceParameterParser.cs
- DictionaryBase.cs
- ConfigurationCollectionAttribute.cs
- StyleConverter.cs
- ButtonFieldBase.cs
- MaterialGroup.cs
- ViewCellSlot.cs
- ArrayHelper.cs
- TraceHandlerErrorFormatter.cs
- ReferencedType.cs
- XmlDownloadManager.cs
- SqlBulkCopyColumnMappingCollection.cs
- BitmapEffectvisualstate.cs
- RestClientProxyHandler.cs
- FixedSOMLineCollection.cs
- LambdaReference.cs
- Rfc2898DeriveBytes.cs
- TaiwanCalendar.cs
- ZipIOCentralDirectoryFileHeader.cs
- CaseStatementProjectedSlot.cs
- MSAANativeProvider.cs
- HuffmanTree.cs
- BinHexEncoding.cs
- FunctionNode.cs
- StringSource.cs
- BaseHashHelper.cs
- GeometryValueSerializer.cs
- XPathAxisIterator.cs
- CqlParser.cs
- TreeViewHitTestInfo.cs
- DebugViewWriter.cs
- XmlNamespaceDeclarationsAttribute.cs
- BmpBitmapDecoder.cs
- ConstrainedDataObject.cs
- WebPartExportVerb.cs
- MarkupCompilePass2.cs
- LambdaReference.cs
- WmpBitmapDecoder.cs
- SqlFacetAttribute.cs
- ErrorProvider.cs
- DataObjectAttribute.cs
- DSASignatureDeformatter.cs
- CancelEventArgs.cs
- XmlKeywords.cs
- XmlSerializer.cs
- IsolatedStorageException.cs
- ItemTypeToolStripMenuItem.cs
- HtmlForm.cs
- AnnotationAdorner.cs
- PrinterUnitConvert.cs
- HotSpotCollection.cs
- ProfileModule.cs
- FontFamily.cs