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
- _NestedSingleAsyncResult.cs
- LazyTextWriterCreator.cs
- WindowsUpDown.cs
- FontStyle.cs
- WebConfigurationHost.cs
- ObjectPersistData.cs
- DictionaryItemsCollection.cs
- XmlNodeReader.cs
- StringUtil.cs
- ScriptModule.cs
- WebPartManagerInternals.cs
- VariableReference.cs
- ContextItemManager.cs
- BypassElement.cs
- DnsPermission.cs
- X509ServiceCertificateAuthentication.cs
- PartialCachingControl.cs
- UpdateRecord.cs
- PersonalizationProvider.cs
- IconEditor.cs
- HeaderedItemsControl.cs
- AnimationTimeline.cs
- DataGridViewCellStateChangedEventArgs.cs
- TableCell.cs
- ScriptReferenceEventArgs.cs
- XmlSchemaSimpleTypeUnion.cs
- wgx_commands.cs
- ParserOptions.cs
- _SpnDictionary.cs
- BitSet.cs
- PresentationSource.cs
- DataSetSchema.cs
- RuntimeResourceSet.cs
- Form.cs
- linebase.cs
- VerificationAttribute.cs
- Interlocked.cs
- TextParentUndoUnit.cs
- ByteStream.cs
- SqlDataSourceCommandParser.cs
- DbDataSourceEnumerator.cs
- SecurityCriticalDataForSet.cs
- RegexParser.cs
- AxParameterData.cs
- CatalogUtil.cs
- VisualTreeHelper.cs
- TextBlockAutomationPeer.cs
- PolyLineSegmentFigureLogic.cs
- ListSortDescriptionCollection.cs
- QuerySetOp.cs
- RijndaelManagedTransform.cs
- Link.cs
- Int16AnimationBase.cs
- PrefixQName.cs
- HtmlControlDesigner.cs
- PersonalizationStateInfoCollection.cs
- GroupItemAutomationPeer.cs
- DataSetUtil.cs
- UpdatePanelTriggerCollection.cs
- AssemblyBuilder.cs
- DbDataSourceEnumerator.cs
- DeviceContexts.cs
- XmlHelper.cs
- ToolstripProfessionalRenderer.cs
- SqlInfoMessageEvent.cs
- InternalBufferOverflowException.cs
- GeneralTransform3DGroup.cs
- EntityParameter.cs
- X509SecurityToken.cs
- ScrollEventArgs.cs
- InteropBitmapSource.cs
- CodeGeneratorOptions.cs
- DataGridViewCellLinkedList.cs
- ThreadNeutralSemaphore.cs
- DoubleLinkList.cs
- ConstructorNeedsTagAttribute.cs
- Propagator.JoinPropagator.cs
- RegisteredArrayDeclaration.cs
- Ref.cs
- LineGeometry.cs
- CodeObject.cs
- OleDbReferenceCollection.cs
- List.cs
- recordstatescratchpad.cs
- WorkflowViewService.cs
- ToolBarButtonClickEvent.cs
- StorageModelBuildProvider.cs
- AutomationProperties.cs
- CompressionTransform.cs
- FlowDocumentPaginator.cs
- CodeGeneratorOptions.cs
- CatchDesigner.xaml.cs
- CommandDevice.cs
- ToolStripOverflowButton.cs
- VisualState.cs
- AnnotationStore.cs
- WebSysDefaultValueAttribute.cs
- InternalRelationshipCollection.cs
- WpfKnownType.cs
- TrackingStringDictionary.cs