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
- CompilerGlobalScopeAttribute.cs
- FileVersionInfo.cs
- CharEnumerator.cs
- CommandCollectionEditor.cs
- InvalidFilterCriteriaException.cs
- SmiEventSink_Default.cs
- TextBox.cs
- HashStream.cs
- DBDataPermission.cs
- EventTrigger.cs
- RelationshipEnd.cs
- InputScope.cs
- MemberRelationshipService.cs
- SqlGatherProducedAliases.cs
- SeparatorAutomationPeer.cs
- ContainerParaClient.cs
- DispatcherHooks.cs
- StylusPlugin.cs
- FSWPathEditor.cs
- TagPrefixCollection.cs
- CompensatableSequenceActivity.cs
- TableHeaderCell.cs
- QuaternionKeyFrameCollection.cs
- GenericEnumerator.cs
- ThreadExceptionDialog.cs
- Int32Collection.cs
- ExceptionCollection.cs
- _RequestCacheProtocol.cs
- ImpersonateTokenRef.cs
- FunctionParameter.cs
- SecurityChannelFactory.cs
- DocumentSequenceHighlightLayer.cs
- OnOperation.cs
- SqlDataSource.cs
- StyleBamlTreeBuilder.cs
- ObjectQueryProvider.cs
- Setter.cs
- DesignTimeTemplateParser.cs
- WeakReferenceList.cs
- SchemaCollectionCompiler.cs
- _BufferOffsetSize.cs
- StringUtil.cs
- ActivityDesigner.cs
- DataSourceControlBuilder.cs
- glyphs.cs
- ExecutionProperties.cs
- DataColumnChangeEvent.cs
- ResourceReader.cs
- XmlAttribute.cs
- PropertyDescriptor.cs
- PassportAuthenticationModule.cs
- OleDbParameter.cs
- ILGenerator.cs
- UshortList2.cs
- MatcherBuilder.cs
- SHA384Managed.cs
- StatusBarPanel.cs
- CompiledIdentityConstraint.cs
- CurrencyManager.cs
- CellParaClient.cs
- DiscreteKeyFrames.cs
- UInt32Storage.cs
- TypeHelper.cs
- HTTPNotFoundHandler.cs
- safemediahandle.cs
- InternalConfigHost.cs
- EventLogPermission.cs
- FlowDocumentPaginator.cs
- CommandField.cs
- CodeVariableReferenceExpression.cs
- SafeProcessHandle.cs
- XpsLiterals.cs
- HandledMouseEvent.cs
- Fault.cs
- BitmapFrameEncode.cs
- PolicyLevel.cs
- CodeLinePragma.cs
- ContentDisposition.cs
- SQLInt16Storage.cs
- EntityDataSourceMemberPath.cs
- PageEventArgs.cs
- CurrentTimeZone.cs
- AssemblyCollection.cs
- ZipIOExtraFieldElement.cs
- Blend.cs
- SecurityHelper.cs
- ISAPIApplicationHost.cs
- ObjectReferenceStack.cs
- diagnosticsswitches.cs
- CompilerTypeWithParams.cs
- DataGridColumnStyleMappingNameEditor.cs
- SafeUserTokenHandle.cs
- Point3DAnimationUsingKeyFrames.cs
- SecurityCapabilities.cs
- ToolStripDropDownItem.cs
- MexTcpBindingElement.cs
- NetMsmqBindingCollectionElement.cs
- BinaryParser.cs
- SqlCacheDependencyDatabase.cs
- CorrelationToken.cs