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
- WindowsBrush.cs
- RestHandlerFactory.cs
- ControlAdapter.cs
- WorkflowInstanceQuery.cs
- DataList.cs
- GeometryHitTestParameters.cs
- Adorner.cs
- SQLChars.cs
- ToolboxItemCollection.cs
- ToolStripItem.cs
- OleAutBinder.cs
- EncryptedXml.cs
- RegexRunner.cs
- OperationAbortedException.cs
- NamespaceInfo.cs
- namescope.cs
- LayoutTable.cs
- IRCollection.cs
- DataGridCellItemAutomationPeer.cs
- ZoomComboBox.cs
- JsonServiceDocumentSerializer.cs
- EnumCodeDomSerializer.cs
- ArraySubsetEnumerator.cs
- RootBrowserWindowProxy.cs
- ListViewItem.cs
- AssemblyCollection.cs
- Viewport3DAutomationPeer.cs
- EditBehavior.cs
- SqlBuffer.cs
- ProgressBarAutomationPeer.cs
- Input.cs
- dataprotectionpermissionattribute.cs
- LinearGradientBrush.cs
- ConnectionsZone.cs
- DiscoveryServerProtocol.cs
- LineUtil.cs
- TransferRequestHandler.cs
- PropertyValueUIItem.cs
- SimpleMailWebEventProvider.cs
- ApplyImportsAction.cs
- XmlNavigatorFilter.cs
- PopupRoot.cs
- PartManifestEntry.cs
- DataServiceQueryContinuation.cs
- CompoundFileReference.cs
- JoinQueryOperator.cs
- SessionSwitchEventArgs.cs
- SoundPlayer.cs
- SqlProfileProvider.cs
- NamedObjectList.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- EntityDataSourceQueryBuilder.cs
- TextDecorationCollection.cs
- VirtualDirectoryMapping.cs
- AssertFilter.cs
- GeometryGroup.cs
- LoginView.cs
- LineVisual.cs
- XmlDataSource.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- StateMachineSubscriptionManager.cs
- UserPreference.cs
- SystemFonts.cs
- DispatcherSynchronizationContext.cs
- DtrList.cs
- PageParserFilter.cs
- CodeLinePragma.cs
- InheritedPropertyChangedEventArgs.cs
- RealizationContext.cs
- SafeCryptoHandles.cs
- GridItem.cs
- CompatibleComparer.cs
- CheckedListBox.cs
- TagNameToTypeMapper.cs
- AttachInfo.cs
- ResXDataNode.cs
- ScriptReferenceEventArgs.cs
- TextFormatterHost.cs
- Graph.cs
- MSHTMLHost.cs
- SplitterEvent.cs
- ResourceFallbackManager.cs
- TextServicesPropertyRanges.cs
- CellQuery.cs
- OdbcException.cs
- EllipseGeometry.cs
- ModifierKeysValueSerializer.cs
- NameTable.cs
- SecurityException.cs
- DataGridViewCellCollection.cs
- CounterSampleCalculator.cs
- StringWriter.cs
- FreezableOperations.cs
- DbProviderFactory.cs
- DaylightTime.cs
- ToolStripDropDownClosingEventArgs.cs
- PreDigestedSignedInfo.cs
- TemplateField.cs
- DataGridViewSelectedRowCollection.cs
- MenuDesigner.cs