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
- XmlSchemaProviderAttribute.cs
- OSFeature.cs
- TableStyle.cs
- WebPartZoneBaseDesigner.cs
- EntityConnection.cs
- SeekStoryboard.cs
- HttpFileCollection.cs
- Nullable.cs
- DetectRunnableInstancesTask.cs
- SequenceRange.cs
- Util.cs
- PopupEventArgs.cs
- SectionVisual.cs
- MsdtcClusterUtils.cs
- SafeFindHandle.cs
- UserControl.cs
- GiveFeedbackEvent.cs
- DependentList.cs
- DesignTimeVisibleAttribute.cs
- CheckBox.cs
- SecurityDescriptor.cs
- ManagementScope.cs
- TdsParserHelperClasses.cs
- EventlogProvider.cs
- ProviderSettings.cs
- JoinQueryOperator.cs
- Automation.cs
- WbmpConverter.cs
- PropertyItemInternal.cs
- FrameworkElementAutomationPeer.cs
- InvalidOperationException.cs
- BypassElementCollection.cs
- ObjectDataSourceSelectingEventArgs.cs
- DataGridViewTextBoxEditingControl.cs
- AutomationProperties.cs
- ImageKeyConverter.cs
- ShaderEffect.cs
- ManagementQuery.cs
- EventWaitHandle.cs
- CodeChecksumPragma.cs
- TreeView.cs
- FixUp.cs
- CompareValidator.cs
- TextTreeUndo.cs
- SpeechDetectedEventArgs.cs
- HandleCollector.cs
- PartBasedPackageProperties.cs
- LoginCancelEventArgs.cs
- SmuggledIUnknown.cs
- ChangeDirector.cs
- DispatcherTimer.cs
- AccessDataSourceWizardForm.cs
- ActiveXSite.cs
- _AutoWebProxyScriptHelper.cs
- CustomCategoryAttribute.cs
- _BaseOverlappedAsyncResult.cs
- ChannelSinkStacks.cs
- TrustExchangeException.cs
- PipeStream.cs
- VirtualPathProvider.cs
- processwaithandle.cs
- Span.cs
- SecurityPolicySection.cs
- PropertyNames.cs
- SqlCachedBuffer.cs
- TextTreeUndo.cs
- OrderPreservingPipeliningMergeHelper.cs
- TargetControlTypeAttribute.cs
- MultipleViewPattern.cs
- PaintEvent.cs
- WebConfigurationFileMap.cs
- GridViewRowCollection.cs
- ModelService.cs
- TransactionInformation.cs
- IFlowDocumentViewer.cs
- MailAddress.cs
- CrossAppDomainChannel.cs
- TypeRestriction.cs
- HttpHandlersSection.cs
- ServerType.cs
- MimeTypePropertyAttribute.cs
- NameSpaceExtractor.cs
- PortCache.cs
- AssemblyBuilder.cs
- FormParameter.cs
- RectangleHotSpot.cs
- KeyEvent.cs
- FixedDSBuilder.cs
- WhiteSpaceTrimStringConverter.cs
- ReadOnlyCollection.cs
- WrappedIUnknown.cs
- ResourceManagerWrapper.cs
- ResizingMessageFilter.cs
- CaseCqlBlock.cs
- ResourceProperty.cs
- Model3DGroup.cs
- _NativeSSPI.cs
- PolicyVersion.cs
- HttpListenerException.cs
- WebScriptMetadataMessage.cs