Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 1 / 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
- XsltConvert.cs
- EventHandlerList.cs
- ApplicationCommands.cs
- COM2PictureConverter.cs
- CodeGotoStatement.cs
- XmlSchemaSimpleTypeRestriction.cs
- IndentedWriter.cs
- Select.cs
- MasterPage.cs
- OracleInternalConnection.cs
- InputReportEventArgs.cs
- JpegBitmapEncoder.cs
- ComplexPropertyEntry.cs
- ModuleConfigurationInfo.cs
- Viewport3DAutomationPeer.cs
- BaseServiceProvider.cs
- RichTextBoxConstants.cs
- TargetPerspective.cs
- ExpressionLexer.cs
- UnicastIPAddressInformationCollection.cs
- DropShadowBitmapEffect.cs
- EditorZoneBase.cs
- Common.cs
- Reference.cs
- AppDomainAttributes.cs
- ColumnPropertiesGroup.cs
- metadatamappinghashervisitor.cs
- TableLayoutCellPaintEventArgs.cs
- XamlPathDataSerializer.cs
- UnsafeNativeMethods.cs
- QueuePathEditor.cs
- PrimitiveDataContract.cs
- externdll.cs
- BlockCollection.cs
- XmlSchemaType.cs
- MouseGesture.cs
- DecoderReplacementFallback.cs
- EntityCommandCompilationException.cs
- ModelTreeEnumerator.cs
- LinqMaximalSubtreeNominator.cs
- TailCallAnalyzer.cs
- GroupLabel.cs
- UpdateProgress.cs
- ThumbButtonInfo.cs
- FileIOPermission.cs
- KnownTypeAttribute.cs
- JapaneseCalendar.cs
- TemplateParser.cs
- BitmapFrameDecode.cs
- Regex.cs
- FixedSOMTableCell.cs
- QilInvokeLateBound.cs
- UndirectedGraph.cs
- CompilerScopeManager.cs
- DoubleLinkList.cs
- WebPartDisplayModeCancelEventArgs.cs
- GifBitmapDecoder.cs
- DataColumnMapping.cs
- PageHandlerFactory.cs
- DesignOnlyAttribute.cs
- Win32.cs
- cookie.cs
- PageRequestManager.cs
- SmiEventSink.cs
- PinnedBufferMemoryStream.cs
- FilterQuery.cs
- WindowsIdentity.cs
- GenericsNotImplementedException.cs
- ObfuscateAssemblyAttribute.cs
- HttpBindingExtension.cs
- RadioButton.cs
- ToolStripLocationCancelEventArgs.cs
- IntSecurity.cs
- XmlAttributeHolder.cs
- FontInfo.cs
- TypeUnloadedException.cs
- TracingConnection.cs
- AnimationLayer.cs
- SemanticBasicElement.cs
- XLinq.cs
- LostFocusEventManager.cs
- DataFormats.cs
- DirectoryObjectSecurity.cs
- XmlSchemaObjectTable.cs
- DetailsViewInsertedEventArgs.cs
- SoapCodeExporter.cs
- AlgoModule.cs
- TextOptions.cs
- MultipartIdentifier.cs
- NetPipeSectionData.cs
- WebPartVerb.cs
- ListCommandEventArgs.cs
- EntityDataSourceDataSelectionPanel.cs
- DesignerDataSchemaClass.cs
- WebPartManagerInternals.cs
- PieceDirectory.cs
- DesignerWithHeader.cs
- DataGridPreparingCellForEditEventArgs.cs
- ColorAnimation.cs
- TextFormatter.cs