Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 1 / 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
- _KerberosClient.cs
- UndoManager.cs
- MenuItemAutomationPeer.cs
- listitem.cs
- BamlRecords.cs
- StandardToolWindows.cs
- ColumnMapProcessor.cs
- FirstQueryOperator.cs
- AnonymousIdentificationModule.cs
- MetadataCollection.cs
- EtwTrackingBehaviorElement.cs
- ComponentEditorPage.cs
- HtmlImageAdapter.cs
- DefaultHttpHandler.cs
- RSAPKCS1SignatureFormatter.cs
- EventLogException.cs
- SafeArchiveContext.cs
- AttributeQuery.cs
- MiniMapControl.xaml.cs
- XmlDataFileEditor.cs
- ColorTransform.cs
- ReadOnlyActivityGlyph.cs
- ThreadAbortException.cs
- PerformanceCounters.cs
- MetadataArtifactLoader.cs
- PrintPreviewDialog.cs
- MessageSmuggler.cs
- WebSysDisplayNameAttribute.cs
- Signature.cs
- BitmapMetadataBlob.cs
- BinaryUtilClasses.cs
- XmlDictionaryReaderQuotas.cs
- BitHelper.cs
- ExpressionBinding.cs
- WindowsBrush.cs
- Repeater.cs
- LinkedResource.cs
- CfgArc.cs
- DataGridViewRowStateChangedEventArgs.cs
- RequestChannelBinder.cs
- ConfigXmlComment.cs
- PropertyGridView.cs
- ContextStack.cs
- ClrProviderManifest.cs
- Subtree.cs
- XmlNavigatorFilter.cs
- NameSpaceExtractor.cs
- SQLInt16Storage.cs
- SubMenuStyle.cs
- DataControlPagerLinkButton.cs
- DataGridItemEventArgs.cs
- WindowClosedEventArgs.cs
- OrCondition.cs
- UnsafeNativeMethods.cs
- DispatcherExceptionFilterEventArgs.cs
- FileSystemInfo.cs
- OdbcTransaction.cs
- ServiceProviders.cs
- HttpProfileBase.cs
- SizeFConverter.cs
- RoleService.cs
- OleAutBinder.cs
- PeerSecurityManager.cs
- SiteMapHierarchicalDataSourceView.cs
- XmlSchemaComplexContentExtension.cs
- Positioning.cs
- FormViewInsertedEventArgs.cs
- PenContext.cs
- MemberMaps.cs
- XmlSchemaDatatype.cs
- TabControlAutomationPeer.cs
- ReflectEventDescriptor.cs
- ManifestResourceInfo.cs
- RangeContentEnumerator.cs
- InvalidWMPVersionException.cs
- FocusTracker.cs
- InputProviderSite.cs
- UnsafeMethods.cs
- FixedFindEngine.cs
- SqlConnection.cs
- SectionVisual.cs
- HwndKeyboardInputProvider.cs
- Hashtable.cs
- ExpressionLink.cs
- ScrollChrome.cs
- FileRecordSequenceCompletedAsyncResult.cs
- ConditionalAttribute.cs
- PointAnimationBase.cs
- Point3DAnimationBase.cs
- DataBindingCollection.cs
- VirtualPath.cs
- CombinedTcpChannel.cs
- ServiceInfoCollection.cs
- XmlSchemaImport.cs
- EventListener.cs
- ListParagraph.cs
- TdsParserSafeHandles.cs
- X509UI.cs
- DynamicResourceExtension.cs
- PackageFilter.cs