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
- StrokeNodeOperations2.cs
- MetadataUtilsSmi.cs
- XmlDataSource.cs
- SafeNativeMethods.cs
- EntityTransaction.cs
- VirtualDirectoryMappingCollection.cs
- DataControlButton.cs
- DeleteMemberBinder.cs
- RSAPKCS1SignatureDeformatter.cs
- TypeForwardedToAttribute.cs
- TTSVoice.cs
- Pen.cs
- BrowsableAttribute.cs
- Guid.cs
- KerberosSecurityTokenProvider.cs
- XPathNodePointer.cs
- UniqueIdentifierService.cs
- SecurityState.cs
- SessionState.cs
- OracleBinary.cs
- DependencySource.cs
- PermissionSetTriple.cs
- ManipulationDevice.cs
- Set.cs
- URLIdentityPermission.cs
- IpcClientChannel.cs
- ReliableReplySessionChannel.cs
- ObjectDisposedException.cs
- OdbcDataReader.cs
- SequentialWorkflowRootDesigner.cs
- TrackingServices.cs
- BitmapEffectInput.cs
- ColumnMapTranslator.cs
- MarkerProperties.cs
- BuildResultCache.cs
- FormClosingEvent.cs
- ComponentDispatcher.cs
- HierarchicalDataBoundControlAdapter.cs
- VersionPair.cs
- InfoCardRSACryptoProvider.cs
- VisualStyleInformation.cs
- CodeTypeMember.cs
- DecoderBestFitFallback.cs
- MailMessageEventArgs.cs
- TextSpanModifier.cs
- CharConverter.cs
- RecognitionResult.cs
- RectAnimation.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- BaseConfigurationRecord.cs
- storagemappingitemcollection.viewdictionary.cs
- DataChangedEventManager.cs
- StorageMappingItemLoader.cs
- DragCompletedEventArgs.cs
- VScrollBar.cs
- OledbConnectionStringbuilder.cs
- IEnumerable.cs
- LambdaCompiler.ControlFlow.cs
- BlurBitmapEffect.cs
- KeyedByTypeCollection.cs
- HttpRawResponse.cs
- XPathEmptyIterator.cs
- TraceRecords.cs
- ChannelDemuxer.cs
- SelectionGlyphBase.cs
- OptionalColumn.cs
- WindowsListViewItemCheckBox.cs
- ErrorItem.cs
- NamespaceCollection.cs
- XPathAxisIterator.cs
- SecurityElement.cs
- CookielessData.cs
- CngProvider.cs
- DataViewManagerListItemTypeDescriptor.cs
- DispatcherExceptionFilterEventArgs.cs
- Calendar.cs
- Light.cs
- MouseButtonEventArgs.cs
- SqlFileStream.cs
- Rfc2898DeriveBytes.cs
- DataBoundControlHelper.cs
- BitmapEncoder.cs
- RegexBoyerMoore.cs
- BrowserPolicyValidator.cs
- BinaryNode.cs
- Int64.cs
- ShaderRenderModeValidation.cs
- AuthorizationBehavior.cs
- RangeValuePattern.cs
- IssuedTokenClientCredential.cs
- CodeLinePragma.cs
- FormsAuthenticationUserCollection.cs
- WindowsFormsHelpers.cs
- BeginEvent.cs
- HttpHandler.cs
- AudioFileOut.cs
- codemethodreferenceexpression.cs
- WebPartCatalogCloseVerb.cs
- ModelProperty.cs
- SqlBulkCopyColumnMapping.cs