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
- EventData.cs
- SqlException.cs
- ResizeBehavior.cs
- TextBox.cs
- SerializableAttribute.cs
- BinaryObjectInfo.cs
- CodeEntryPointMethod.cs
- Unit.cs
- ErrorFormatter.cs
- AnnotationDocumentPaginator.cs
- FileStream.cs
- ProfilePropertySettingsCollection.cs
- DesignerActionTextItem.cs
- DecimalFormatter.cs
- CodePrimitiveExpression.cs
- ExtensionQuery.cs
- WmlLiteralTextAdapter.cs
- ProcessHostConfigUtils.cs
- ContainerUIElement3D.cs
- SmtpMail.cs
- DataSetViewSchema.cs
- XmlSchemaExporter.cs
- Run.cs
- ContextMenu.cs
- AmbiguousMatchException.cs
- MenuTracker.cs
- XmlAtomicValue.cs
- datacache.cs
- DirectoryNotFoundException.cs
- XomlCompilerHelpers.cs
- Expressions.cs
- TypeInitializationException.cs
- ControlPropertyNameConverter.cs
- DataGridViewSelectedColumnCollection.cs
- MasterPageCodeDomTreeGenerator.cs
- SystemWebSectionGroup.cs
- ListChunk.cs
- ListViewItem.cs
- MetadataUtil.cs
- hresults.cs
- SHA1CryptoServiceProvider.cs
- DbMetaDataCollectionNames.cs
- Matrix3D.cs
- ErrorProvider.cs
- SoapReflector.cs
- Polygon.cs
- BasicHttpMessageCredentialType.cs
- SignatureToken.cs
- AuthenticationManager.cs
- PointHitTestParameters.cs
- DependentTransaction.cs
- ButtonFlatAdapter.cs
- BooleanProjectedSlot.cs
- DataGridViewAccessibleObject.cs
- ReflectTypeDescriptionProvider.cs
- SBCSCodePageEncoding.cs
- ThreadStateException.cs
- XomlCompilerHelpers.cs
- ToolStripLabel.cs
- ContentPresenter.cs
- Persist.cs
- serverconfig.cs
- SHA256Managed.cs
- MetadataUtil.cs
- BufferedStream.cs
- WebContext.cs
- RoleGroupCollection.cs
- DeviceFilterDictionary.cs
- GlyphsSerializer.cs
- FileDialogCustomPlacesCollection.cs
- StreamAsIStream.cs
- ChildrenQuery.cs
- QilIterator.cs
- ThicknessKeyFrameCollection.cs
- Hashtable.cs
- EncryptedData.cs
- TextFindEngine.cs
- X509SubjectKeyIdentifierClause.cs
- SqlFormatter.cs
- SelectionItemPattern.cs
- InitializingNewItemEventArgs.cs
- Image.cs
- CompatibleComparer.cs
- MemberDomainMap.cs
- BypassElement.cs
- RouteParameter.cs
- diagnosticsswitches.cs
- SqlDataReaderSmi.cs
- DragSelectionMessageFilter.cs
- ConfigurationSectionCollection.cs
- AndCondition.cs
- PolicyManager.cs
- ConnectionProviderAttribute.cs
- UpdateProgress.cs
- AssertSection.cs
- ProviderSettings.cs
- DataObjectSettingDataEventArgs.cs
- SelectQueryOperator.cs
- MenuStrip.cs
- FlowDocumentScrollViewerAutomationPeer.cs