Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 1305376 / ModelPerspective.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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 [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- httpapplicationstate.cs
- InvalidCommandTreeException.cs
- EtwTrace.cs
- SqlBooleanizer.cs
- DataControlLinkButton.cs
- SelectionEditingBehavior.cs
- Html32TextWriter.cs
- SByte.cs
- CodeVariableDeclarationStatement.cs
- EntitySqlQueryBuilder.cs
- TdsParserStaticMethods.cs
- DataGridViewTopLeftHeaderCell.cs
- FormViewDeletedEventArgs.cs
- SafeHandles.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- HasCopySemanticsAttribute.cs
- DocComment.cs
- HotSpotCollection.cs
- VisualStyleInformation.cs
- XmlSchemaSearchPattern.cs
- SafeEventHandle.cs
- PkcsUtils.cs
- EventInfo.cs
- XmlDownloadManager.cs
- XPathNodeList.cs
- XmlObjectSerializerWriteContextComplex.cs
- AnnotationObservableCollection.cs
- WindowsScrollBarBits.cs
- ItemsPanelTemplate.cs
- SiteMapDataSource.cs
- SQLDateTimeStorage.cs
- DataGridViewCellPaintingEventArgs.cs
- WebPartEditorCancelVerb.cs
- Event.cs
- CollectionView.cs
- SecurityManager.cs
- ToolStripDropDown.cs
- WindowInteropHelper.cs
- CodeMemberProperty.cs
- VideoDrawing.cs
- COM2IPerPropertyBrowsingHandler.cs
- TransactionScopeDesigner.cs
- ErrorRuntimeConfig.cs
- StubHelpers.cs
- DataControlButton.cs
- ListViewTableCell.cs
- RubberbandSelector.cs
- HuffCodec.cs
- WebRequest.cs
- XmlDictionaryReaderQuotasElement.cs
- Internal.cs
- ValueTable.cs
- EventBuilder.cs
- Size.cs
- DispatchOperation.cs
- StrokeFIndices.cs
- CodeRemoveEventStatement.cs
- Method.cs
- CustomValidator.cs
- OleDbDataReader.cs
- SpotLight.cs
- Update.cs
- CSharpCodeProvider.cs
- TextShapeableCharacters.cs
- SBCSCodePageEncoding.cs
- Image.cs
- CommonDialog.cs
- RecognizedAudio.cs
- Cursors.cs
- XPathNode.cs
- FixUp.cs
- WindowsTab.cs
- OperationResponse.cs
- SapiRecognizer.cs
- CroppedBitmap.cs
- MultiTouchSystemGestureLogic.cs
- DataTable.cs
- StrokeNodeEnumerator.cs
- RoutedEvent.cs
- XmlSchemaInfo.cs
- ListParaClient.cs
- ByteAnimation.cs
- ActivationArguments.cs
- Positioning.cs
- Vector3DIndependentAnimationStorage.cs
- HandleValueEditor.cs
- SspiHelper.cs
- CodeAssignStatement.cs
- MachinePropertyVariants.cs
- ScriptManager.cs
- TCPClient.cs
- EventsTab.cs
- AsymmetricCryptoHandle.cs
- Model3DCollection.cs
- RegexCode.cs
- NativeMethods.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- XMLSchema.cs
- ScrollViewerAutomationPeer.cs
- Scene3D.cs