Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / KeyProperty.cs / 1 / KeyProperty.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Data.Metadata.Edm; namespace System.Data.EntityModel.SchemaObjectModel { ////// Represents PropertyRef Element for Entity keys and referential constraints /// internal sealed class PropertyRefElement : SchemaElement { #region Instance Fields private StructuredProperty _property = null; #endregion #region Public Methods ////// construct a KeyProperty object /// /// public PropertyRefElement(SchemaElement parentElement) : base(parentElement) { } #endregion #region Public Properties ////// property chain from KeyedType to Leaf property /// public StructuredProperty Property { get { return _property; } } #endregion #region Private Methods internal override void ResolveTopLevelNames() { Debug.Assert(false, "This method should never be used. Use other overload instead"); } ////// Since this method can be used in different context, this method does not add any errors /// Please make sure that the caller of this methods handles the error case and add errors /// appropriately /// /// ///internal bool ResolveNames(SchemaEntityType entityType) { if (string.IsNullOrEmpty(this.Name)) { // Don't flag this error. This must already must have flaged as error, while handling name attribute return true; } // Make sure there is a property by this name _property = entityType.FindProperty(this.Name); return (_property != null); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Data.Metadata.Edm; namespace System.Data.EntityModel.SchemaObjectModel { ////// Represents PropertyRef Element for Entity keys and referential constraints /// internal sealed class PropertyRefElement : SchemaElement { #region Instance Fields private StructuredProperty _property = null; #endregion #region Public Methods ////// construct a KeyProperty object /// /// public PropertyRefElement(SchemaElement parentElement) : base(parentElement) { } #endregion #region Public Properties ////// property chain from KeyedType to Leaf property /// public StructuredProperty Property { get { return _property; } } #endregion #region Private Methods internal override void ResolveTopLevelNames() { Debug.Assert(false, "This method should never be used. Use other overload instead"); } ////// Since this method can be used in different context, this method does not add any errors /// Please make sure that the caller of this methods handles the error case and add errors /// appropriately /// /// ///internal bool ResolveNames(SchemaEntityType entityType) { if (string.IsNullOrEmpty(this.Name)) { // Don't flag this error. This must already must have flaged as error, while handling name attribute return true; } // Make sure there is a property by this name _property = entityType.FindProperty(this.Name); return (_property != 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
- ItemDragEvent.cs
- FederatedMessageSecurityOverHttpElement.cs
- WorkflowDesignerColors.cs
- AnimationException.cs
- CanonicalXml.cs
- CodeObject.cs
- AsymmetricSignatureDeformatter.cs
- RequestCachingSection.cs
- IDictionary.cs
- MapPathBasedVirtualPathProvider.cs
- ToolboxCategoryItems.cs
- MatchAttribute.cs
- DesignTimeTemplateParser.cs
- ItemsControlAutomationPeer.cs
- SymbolMethod.cs
- SpStreamWrapper.cs
- VectorValueSerializer.cs
- InternalCache.cs
- OdbcFactory.cs
- Group.cs
- TypeGeneratedEventArgs.cs
- BaseAddressPrefixFilterElement.cs
- QilDataSource.cs
- WindowsTokenRoleProvider.cs
- UnicastIPAddressInformationCollection.cs
- mediapermission.cs
- RemotingConfigParser.cs
- InheritanceContextHelper.cs
- FixedDocumentSequencePaginator.cs
- DesignerActionItem.cs
- ZipPackage.cs
- DrawingImage.cs
- StylusLogic.cs
- Scheduling.cs
- SqlXmlStorage.cs
- AccessKeyManager.cs
- GridViewUpdateEventArgs.cs
- Int32CollectionConverter.cs
- WindowsFormsHost.cs
- FileSystemEnumerable.cs
- FontNamesConverter.cs
- _StreamFramer.cs
- xml.cs
- PenThreadPool.cs
- TabletCollection.cs
- ArgumentException.cs
- MsmqMessageProperty.cs
- StyleBamlRecordReader.cs
- XmlSchemaAttribute.cs
- CultureSpecificStringDictionary.cs
- ThousandthOfEmRealDoubles.cs
- translator.cs
- Brush.cs
- HtmlAnchor.cs
- StaticExtension.cs
- datacache.cs
- CodeTypeDelegate.cs
- WinHttpWebProxyFinder.cs
- TreeNodeStyle.cs
- SingleKeyFrameCollection.cs
- Parameter.cs
- DebugControllerThread.cs
- Vector3DValueSerializer.cs
- WebPartCloseVerb.cs
- ToolStripArrowRenderEventArgs.cs
- MultiDataTrigger.cs
- IndentTextWriter.cs
- ContentPlaceHolderDesigner.cs
- datacache.cs
- XsltArgumentList.cs
- NumberFormatInfo.cs
- _NestedSingleAsyncResult.cs
- SerializationStore.cs
- EnterpriseServicesHelper.cs
- hresults.cs
- MenuItem.cs
- NumberSubstitution.cs
- UrlAuthFailedErrorFormatter.cs
- WebPartDisplayModeEventArgs.cs
- TextEffect.cs
- ObjectItemCollection.cs
- AsyncCompletedEventArgs.cs
- RuntimeHelpers.cs
- SplitContainer.cs
- Utils.cs
- TreeNodeStyleCollection.cs
- JsonGlobals.cs
- DataGridViewAccessibleObject.cs
- DisplayNameAttribute.cs
- WindowsListViewSubItem.cs
- DataGridHeaderBorder.cs
- CodeVariableDeclarationStatement.cs
- EventLevel.cs
- SendingRequestEventArgs.cs
- CacheAxisQuery.cs
- WindowsGraphicsCacheManager.cs
- InkPresenterAutomationPeer.cs
- PrivacyNoticeBindingElementImporter.cs
- RtfNavigator.cs
- InfoCardArgumentException.cs