Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 3 / 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
- OutputCacheSettings.cs
- RegionIterator.cs
- AutoGeneratedField.cs
- CodeTryCatchFinallyStatement.cs
- PeerToPeerException.cs
- MDIWindowDialog.cs
- HtmlDocument.cs
- TextElement.cs
- ViewBase.cs
- RowVisual.cs
- NetworkCredential.cs
- BaseTemplateBuildProvider.cs
- XsltQilFactory.cs
- MasterPageCodeDomTreeGenerator.cs
- EventHandlersStore.cs
- DesignerTextWriter.cs
- HtmlControl.cs
- StylusPointDescription.cs
- UIElement3D.cs
- CalendarDataBindingHandler.cs
- QueryOutputWriter.cs
- ReadOnlyPermissionSet.cs
- ClassGenerator.cs
- Block.cs
- SafeMILHandle.cs
- Thumb.cs
- OLEDB_Util.cs
- ReadWriteObjectLock.cs
- CodeParameterDeclarationExpression.cs
- LinkAreaEditor.cs
- JoinGraph.cs
- Int32RectValueSerializer.cs
- BitmapFrame.cs
- PanningMessageFilter.cs
- EtwTrace.cs
- Visual3D.cs
- SetIterators.cs
- ItemsPanelTemplate.cs
- CompilerScopeManager.cs
- SqlDataSourceStatusEventArgs.cs
- PageVisual.cs
- SafeSecurityHandles.cs
- TraceUtility.cs
- ToolStripSplitStackLayout.cs
- ContextMenuStrip.cs
- ReadWriteObjectLock.cs
- FlowDocumentPage.cs
- COAUTHINFO.cs
- ProtocolElement.cs
- ExtendedProtectionPolicy.cs
- PartialList.cs
- ExpressionReplacer.cs
- XMLUtil.cs
- TreeChangeInfo.cs
- ParserHooks.cs
- TriggerBase.cs
- documentsequencetextview.cs
- SqlMultiplexer.cs
- OperationAbortedException.cs
- CodeEventReferenceExpression.cs
- _UncName.cs
- ChangeTracker.cs
- CurrencyManager.cs
- GrammarBuilder.cs
- StateBag.cs
- CqlLexerHelpers.cs
- HotSpotCollection.cs
- ArrayList.cs
- RepeaterItem.cs
- Rect3DValueSerializer.cs
- ToolStripDesigner.cs
- IndentedWriter.cs
- ToolbarAUtomationPeer.cs
- SyntaxCheck.cs
- FlowDocument.cs
- SchemeSettingElementCollection.cs
- RegistrySecurity.cs
- DefaultWorkflowSchedulerService.cs
- Update.cs
- ActivityBuilderHelper.cs
- XmlAttributeHolder.cs
- ValidationRule.cs
- QueryAccessibilityHelpEvent.cs
- Keywords.cs
- GenericAuthenticationEventArgs.cs
- Cursor.cs
- FastEncoder.cs
- DataGridTablesFactory.cs
- XmlComment.cs
- ListManagerBindingsCollection.cs
- Token.cs
- SafeRegistryKey.cs
- InputScopeManager.cs
- DataError.cs
- PnrpPermission.cs
- SponsorHelper.cs
- TextureBrush.cs
- SemanticValue.cs
- BrowserCapabilitiesCodeGenerator.cs
- PerformanceCounterPermissionEntry.cs