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
- WebPartEditorCancelVerb.cs
- PropertyMapper.cs
- EntityConnection.cs
- HtmlProps.cs
- CodeArrayCreateExpression.cs
- BasicKeyConstraint.cs
- Pair.cs
- Exceptions.cs
- ParserExtension.cs
- BaseValidator.cs
- HandlerWithFactory.cs
- AppDomainProtocolHandler.cs
- GacUtil.cs
- ServiceObjectContainer.cs
- MimeMultiPart.cs
- CommandEventArgs.cs
- DBSqlParserTable.cs
- OracleLob.cs
- DataGridDesigner.cs
- RemotingSurrogateSelector.cs
- WindowsListViewGroup.cs
- SymbolMethod.cs
- Site.cs
- StandardBindingOptionalReliableSessionElement.cs
- ProfileInfo.cs
- CompiledXpathExpr.cs
- NonParentingControl.cs
- PreDigestedSignedInfo.cs
- MailWebEventProvider.cs
- ToolStripPanelSelectionBehavior.cs
- XslCompiledTransform.cs
- RestHandlerFactory.cs
- ProtocolsConfigurationEntry.cs
- ParallelDesigner.cs
- OdbcDataReader.cs
- dbdatarecord.cs
- DoubleCollectionConverter.cs
- login.cs
- MetadataWorkspace.cs
- FontUnit.cs
- LocalFileSettingsProvider.cs
- StorageEndPropertyMapping.cs
- ErrorWebPart.cs
- Win32MouseDevice.cs
- OdbcCommand.cs
- StringWriter.cs
- PeerPresenceInfo.cs
- UnhandledExceptionEventArgs.cs
- InputEventArgs.cs
- _NtlmClient.cs
- Misc.cs
- BindingManagerDataErrorEventArgs.cs
- ContextMenuStripGroup.cs
- ToolStripComboBox.cs
- TypeLoadException.cs
- RegionInfo.cs
- SmtpFailedRecipientException.cs
- CodeTypeDeclarationCollection.cs
- DataListItemCollection.cs
- XsltContext.cs
- TypeSystem.cs
- DataContractSerializerSection.cs
- BehaviorService.cs
- userdatakeys.cs
- OutputScope.cs
- EdmError.cs
- ExpressionBindings.cs
- _LocalDataStoreMgr.cs
- DataList.cs
- WebPart.cs
- Size.cs
- ToolStripRendererSwitcher.cs
- StringValidatorAttribute.cs
- PointConverter.cs
- ProjectedSlot.cs
- SqlUserDefinedAggregateAttribute.cs
- IpcChannel.cs
- TransformationRules.cs
- Calendar.cs
- WorkflowLayouts.cs
- Converter.cs
- XmlTextReader.cs
- TypeUtils.cs
- QueryOpcode.cs
- VirtualizedContainerService.cs
- InputQueue.cs
- NameTable.cs
- HttpChannelHelpers.cs
- TextEditor.cs
- ServiceThrottlingBehavior.cs
- hresults.cs
- UIHelper.cs
- CroppedBitmap.cs
- SchemaNamespaceManager.cs
- XmlQueryOutput.cs
- ScriptDescriptor.cs
- XmlSerializationWriter.cs
- PropertyDescriptorCollection.cs
- ControlIdConverter.cs
- WindowsTokenRoleProvider.cs