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
- OrderPreservingSpoolingTask.cs
- StrokeNodeEnumerator.cs
- SoapReflectionImporter.cs
- DetailsView.cs
- TextEndOfLine.cs
- ValueOfAction.cs
- EventDescriptorCollection.cs
- CLRBindingWorker.cs
- CornerRadius.cs
- InputScopeManager.cs
- StringInfo.cs
- CompilationAssemblyInstallComponent.cs
- DBCommand.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- WindowsIdentity.cs
- FixedSOMImage.cs
- ConcurrentStack.cs
- typedescriptorpermission.cs
- KeyBinding.cs
- Funcletizer.cs
- PeerService.cs
- TransformPatternIdentifiers.cs
- CodeMemberMethod.cs
- HtmlTable.cs
- SnapshotChangeTrackingStrategy.cs
- MatchingStyle.cs
- SystemNetHelpers.cs
- EnvironmentPermission.cs
- SystemPens.cs
- UpdatePanelTrigger.cs
- SerializationSectionGroup.cs
- Barrier.cs
- EntityDataSourceContextCreatedEventArgs.cs
- DetailsViewInsertedEventArgs.cs
- ClientFormsIdentity.cs
- ReferentialConstraint.cs
- OracleBoolean.cs
- SizeLimitedCache.cs
- ScriptResourceDefinition.cs
- SQLInt64Storage.cs
- GatewayDefinition.cs
- WorkflowServiceBehavior.cs
- SecurityUtils.cs
- MetadataItemEmitter.cs
- xml.cs
- Application.cs
- SafeNativeMethodsCLR.cs
- CaseInsensitiveHashCodeProvider.cs
- TrackBarRenderer.cs
- Encoder.cs
- FixedSOMTableCell.cs
- GridViewColumn.cs
- UpdateException.cs
- Rect3D.cs
- Helper.cs
- ToolStripDropDownItem.cs
- Margins.cs
- UnsafeNativeMethods.cs
- DrawingContextWalker.cs
- DataExpression.cs
- TextBox.cs
- HttpCacheParams.cs
- ModuleElement.cs
- TreeNode.cs
- CellIdBoolean.cs
- BookmarkEventArgs.cs
- hwndwrapper.cs
- XmlNotation.cs
- CursorEditor.cs
- BinaryObjectReader.cs
- Point3DIndependentAnimationStorage.cs
- ReadOnlyState.cs
- DataGridPageChangedEventArgs.cs
- PrintPageEvent.cs
- ByteStreamGeometryContext.cs
- SqlCacheDependency.cs
- ClassData.cs
- ThumbAutomationPeer.cs
- HMACSHA512.cs
- MarkedHighlightComponent.cs
- DefaultAssemblyResolver.cs
- OdbcError.cs
- RenamedEventArgs.cs
- View.cs
- DataGridViewCellCollection.cs
- EraserBehavior.cs
- HelpOperationInvoker.cs
- BindingListCollectionView.cs
- ErrorProvider.cs
- unitconverter.cs
- ObjectListItem.cs
- DrawingDrawingContext.cs
- MsmqIntegrationSecurity.cs
- ListViewGroupConverter.cs
- XmlDataLoader.cs
- QilUnary.cs
- PriorityBindingExpression.cs
- ZoneIdentityPermission.cs
- EncryptRequest.cs
- DetailsView.cs