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
- HttpListenerResponse.cs
- DoubleLink.cs
- StyleSheetRefUrlEditor.cs
- Queue.cs
- SimpleWorkerRequest.cs
- SystemIcmpV4Statistics.cs
- OleDbMetaDataFactory.cs
- AudioStateChangedEventArgs.cs
- TextElementCollection.cs
- CodeDOMProvider.cs
- AppDomainCompilerProxy.cs
- ObjectDataSourceMethodEventArgs.cs
- WsatProxy.cs
- HttpModuleCollection.cs
- DictionarySectionHandler.cs
- DialogResultConverter.cs
- ControlBuilderAttribute.cs
- TreePrinter.cs
- EntityDataSourceEntityTypeFilterItem.cs
- Duration.cs
- QueryResults.cs
- GridViewDeleteEventArgs.cs
- MethodCallConverter.cs
- X509Chain.cs
- ModulesEntry.cs
- OleDbCommandBuilder.cs
- SerializationInfo.cs
- WebPartConnectionsCancelVerb.cs
- LabelLiteral.cs
- IdentifierCollection.cs
- ApplicationManager.cs
- XamlRtfConverter.cs
- ValidatedControlConverter.cs
- EventSourceCreationData.cs
- CodeDirectionExpression.cs
- FileLoadException.cs
- AccessDataSourceView.cs
- COM2PropertyPageUITypeConverter.cs
- RegionData.cs
- TemplateControlParser.cs
- CompModHelpers.cs
- storepermissionattribute.cs
- ProjectionQueryOptionExpression.cs
- ReliabilityContractAttribute.cs
- MsmqHostedTransportConfiguration.cs
- HttpSocketManager.cs
- XmlILOptimizerVisitor.cs
- View.cs
- ConstantProjectedSlot.cs
- Transform3D.cs
- FixUp.cs
- BamlWriter.cs
- DeferredElementTreeState.cs
- DATA_BLOB.cs
- SchemaConstraints.cs
- AssemblyNameProxy.cs
- ExecutionEngineException.cs
- CheckBox.cs
- InvariantComparer.cs
- PenThread.cs
- WindowsComboBox.cs
- OdbcParameter.cs
- ListBindingConverter.cs
- HtmlControl.cs
- GeometryDrawing.cs
- DataGridViewToolTip.cs
- OletxDependentTransaction.cs
- SchemaMapping.cs
- SeparatorAutomationPeer.cs
- CharacterBufferReference.cs
- ColorInterpolationModeValidation.cs
- XmlSchemaSimpleTypeList.cs
- autovalidator.cs
- UICuesEvent.cs
- XPathDocument.cs
- NotifyInputEventArgs.cs
- CodeValidator.cs
- Renderer.cs
- SafeLibraryHandle.cs
- Encoding.cs
- HwndSourceKeyboardInputSite.cs
- ServicesUtilities.cs
- Point3DAnimationBase.cs
- StrongNamePublicKeyBlob.cs
- SQLMembershipProvider.cs
- SqlServices.cs
- WSSecurityJan2004.cs
- XmlDictionaryString.cs
- ExpressionBuilderCollection.cs
- XmlObjectSerializerReadContextComplex.cs
- ControlParameter.cs
- ResourcePool.cs
- ObjectViewFactory.cs
- JsonReaderWriterFactory.cs
- MiniModule.cs
- OracleParameter.cs
- HealthMonitoringSectionHelper.cs
- TrackingProfileCache.cs
- MethodCallTranslator.cs
- HttpProcessUtility.cs