Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / ModelPerspective.cs / 3 / 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
- DbParameterHelper.cs
- OdbcFactory.cs
- ArrayListCollectionBase.cs
- XhtmlTextWriter.cs
- ListenerBinder.cs
- Function.cs
- XmlSchemaDatatype.cs
- XmlSchemaSimpleTypeList.cs
- XmlSchemaAll.cs
- WindowsHyperlink.cs
- ProvidersHelper.cs
- ToolStripManager.cs
- UrlPath.cs
- Registry.cs
- PropertyKey.cs
- MembershipSection.cs
- SynchronousChannel.cs
- ListViewCommandEventArgs.cs
- CodeGenerator.cs
- OutputCacheProfileCollection.cs
- ETagAttribute.cs
- Path.cs
- NonParentingControl.cs
- SendKeys.cs
- SplashScreenNativeMethods.cs
- LocatorPart.cs
- ToolboxItemFilterAttribute.cs
- DispatcherOperation.cs
- Membership.cs
- EtwTrackingParticipant.cs
- AvTrace.cs
- DebugHandleTracker.cs
- ImageCodecInfoPrivate.cs
- ToolStripContentPanel.cs
- PinnedBufferMemoryStream.cs
- PointCollectionConverter.cs
- ModelVisual3D.cs
- QuadraticBezierSegment.cs
- JapaneseCalendar.cs
- DependencyPropertyConverter.cs
- MarkupExtensionReturnTypeAttribute.cs
- Substitution.cs
- _UriSyntax.cs
- RegexInterpreter.cs
- SqlConnectionStringBuilder.cs
- MessageContractExporter.cs
- ByteStream.cs
- ActionFrame.cs
- ControlEvent.cs
- Trace.cs
- WebCategoryAttribute.cs
- AutoResetEvent.cs
- EventToken.cs
- SessionState.cs
- Tablet.cs
- Missing.cs
- IssuanceLicense.cs
- Path.cs
- AssemblyNameProxy.cs
- DecimalAnimation.cs
- DesignTimeXamlWriter.cs
- BasicKeyConstraint.cs
- documentsequencetextpointer.cs
- CodeDirectiveCollection.cs
- DocumentationServerProtocol.cs
- SoapInteropTypes.cs
- DBDataPermissionAttribute.cs
- XmlSchemaIdentityConstraint.cs
- FontFamilyConverter.cs
- BitmapMetadataBlob.cs
- RootBrowserWindow.cs
- KeyTimeConverter.cs
- DSASignatureFormatter.cs
- SourceFilter.cs
- AnchoredBlock.cs
- _NegoState.cs
- XmlSchemaCollection.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- BaseAsyncResult.cs
- WebPartCollection.cs
- Activator.cs
- StylusEditingBehavior.cs
- PrintDialogException.cs
- Light.cs
- odbcmetadatafactory.cs
- DocumentsTrace.cs
- AutomationPeer.cs
- FamilyTypeface.cs
- CompilerInfo.cs
- TextParentUndoUnit.cs
- CollectionConverter.cs
- XmlTextReaderImplHelpers.cs
- HttpConfigurationContext.cs
- WarningException.cs
- WebPartAddingEventArgs.cs
- OleStrCAMarshaler.cs
- MenuAdapter.cs
- GenerateTemporaryTargetAssembly.cs
- IisTraceWebEventProvider.cs
- Label.cs