Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SimpleBitVector32.cs
- NameValueConfigurationCollection.cs
- XamlHttpHandlerFactory.cs
- GeneratedCodeAttribute.cs
- DllHostedComPlusServiceHost.cs
- ProgressBarRenderer.cs
- TextRangeProviderWrapper.cs
- KnownBoxes.cs
- ConfigurationSettings.cs
- SiteMapNodeCollection.cs
- DashStyle.cs
- MobilePage.cs
- HasCopySemanticsAttribute.cs
- JoinTreeNode.cs
- ObjectRef.cs
- diagnosticsswitches.cs
- ConstantCheck.cs
- ViewGenResults.cs
- SafeRightsManagementHandle.cs
- SingletonChannelAcceptor.cs
- TextHidden.cs
- Util.cs
- DataGridViewElement.cs
- ToolboxItemFilterAttribute.cs
- Classification.cs
- TableLayoutPanelCellPosition.cs
- ZipIOExtraFieldZip64Element.cs
- AttachedAnnotationChangedEventArgs.cs
- BaseConfigurationRecord.cs
- DataRow.cs
- TranslateTransform3D.cs
- XamlSerializerUtil.cs
- ComplexPropertyEntry.cs
- XmlBinaryReader.cs
- SecurityPolicySection.cs
- EncoderNLS.cs
- GridViewRowEventArgs.cs
- EffectiveValueEntry.cs
- ConsoleTraceListener.cs
- TraceSource.cs
- SQLInt64.cs
- LayoutSettings.cs
- OleDbPermission.cs
- CodeSnippetExpression.cs
- Debug.cs
- CqlBlock.cs
- KeyToListMap.cs
- ProxyManager.cs
- ScrollableControl.cs
- Window.cs
- WebPartTransformerAttribute.cs
- ParamArrayAttribute.cs
- FormsAuthenticationCredentials.cs
- XamlTreeBuilderBamlRecordWriter.cs
- MessageHeaderDescriptionCollection.cs
- ArcSegment.cs
- ElementAction.cs
- AttributeEmitter.cs
- ActivityExecutorSurrogate.cs
- DeclaredTypeElementCollection.cs
- NewExpression.cs
- InputLanguageSource.cs
- FontCollection.cs
- TextStore.cs
- COM2ExtendedBrowsingHandler.cs
- HtmlPanelAdapter.cs
- DbConnectionPoolIdentity.cs
- TableLayoutSettings.cs
- LinqDataSourceUpdateEventArgs.cs
- ComboBoxItem.cs
- UserControlCodeDomTreeGenerator.cs
- EraserBehavior.cs
- ADRole.cs
- SqlDataSourceCache.cs
- RequestNavigateEventArgs.cs
- TrackingProfileCache.cs
- BindingGroup.cs
- FormatVersion.cs
- PerfCounterSection.cs
- LostFocusEventManager.cs
- SubqueryTrackingVisitor.cs
- EntitySqlQueryCacheKey.cs
- StorageComplexTypeMapping.cs
- SHA512Cng.cs
- XmlQueryStaticData.cs
- NetSectionGroup.cs
- OwnerDrawPropertyBag.cs
- RadioButton.cs
- DataGridComponentEditor.cs
- HostingEnvironmentSection.cs
- SQLGuid.cs
- CompositeActivityMarkupSerializer.cs
- NegotiateStream.cs
- SpotLight.cs
- TableSectionStyle.cs
- GridViewColumnHeader.cs
- FieldBuilder.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- AtomServiceDocumentSerializer.cs
- PreviewPageInfo.cs