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
- QuadraticBezierSegment.cs
- GeneralTransformGroup.cs
- XmlCharacterData.cs
- ServerValidateEventArgs.cs
- Accessible.cs
- SystemColors.cs
- SelectionItemPattern.cs
- FormViewUpdateEventArgs.cs
- StylusTouchDevice.cs
- MergeLocalizationDirectives.cs
- ValueProviderWrapper.cs
- SecUtil.cs
- IdentityReference.cs
- TreeNodeBindingCollection.cs
- TextElementEnumerator.cs
- ByeOperationCD1AsyncResult.cs
- SymLanguageType.cs
- GregorianCalendarHelper.cs
- XmlSchemaObjectCollection.cs
- StylusPointPropertyInfoDefaults.cs
- ReversePositionQuery.cs
- SQLDecimalStorage.cs
- TypeInitializationException.cs
- ObjectDataSourceDisposingEventArgs.cs
- ConfigurationPropertyCollection.cs
- WorkflowOperationFault.cs
- SmtpDigestAuthenticationModule.cs
- OraclePermissionAttribute.cs
- DocumentSequenceHighlightLayer.cs
- Dictionary.cs
- ToolStripItemEventArgs.cs
- PropertyIDSet.cs
- TreeNodeMouseHoverEvent.cs
- AdapterSwitches.cs
- CustomErrorsSection.cs
- WebPartEditorApplyVerb.cs
- PropertyManager.cs
- SingleConverter.cs
- SigningDialog.cs
- Int32KeyFrameCollection.cs
- DataColumnCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- SpellCheck.cs
- DetailsViewUpdateEventArgs.cs
- XPathSelfQuery.cs
- ServerProtocol.cs
- InfoCardHelper.cs
- CodeMemberMethod.cs
- LZCodec.cs
- UIntPtr.cs
- MinMaxParagraphWidth.cs
- FocusTracker.cs
- PerformanceCounterPermissionEntryCollection.cs
- WorkflowRuntimeService.cs
- ISFTagAndGuidCache.cs
- BasicKeyConstraint.cs
- SingleAnimation.cs
- XPathSingletonIterator.cs
- Base64Encoding.cs
- ValidatorCompatibilityHelper.cs
- DbProviderConfigurationHandler.cs
- DataGridViewRowPostPaintEventArgs.cs
- WorkflowDebuggerSteppingAttribute.cs
- StateMachine.cs
- CaretElement.cs
- CultureInfo.cs
- XpsPackagingException.cs
- FileVersionInfo.cs
- Int32Rect.cs
- ContextMenu.cs
- TickBar.cs
- Compiler.cs
- BatchWriter.cs
- DetailsViewPagerRow.cs
- DesigntimeLicenseContextSerializer.cs
- DispatcherFrame.cs
- DateTimeValueSerializerContext.cs
- FormViewAutoFormat.cs
- EncodingTable.cs
- BaseCollection.cs
- MediaContextNotificationWindow.cs
- RawAppCommandInputReport.cs
- TransactionException.cs
- StylusButtonEventArgs.cs
- MessageFilter.cs
- ConfigXmlAttribute.cs
- RectangleGeometry.cs
- MatrixValueSerializer.cs
- CipherData.cs
- DataReceivedEventArgs.cs
- Label.cs
- initElementDictionary.cs
- DoubleCollection.cs
- Graph.cs
- EncoderParameters.cs
- FormsAuthenticationCredentials.cs
- DataService.cs
- TrustManager.cs
- MatrixTransform3D.cs
- DesignTimeXamlWriter.cs