Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / KeyProperty.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaComplexType.cs
- TrustManagerPromptUI.cs
- NameNode.cs
- MessagePartSpecification.cs
- CodeParameterDeclarationExpression.cs
- Int32CollectionValueSerializer.cs
- SynchronizationLockException.cs
- Geometry3D.cs
- TableLayoutPanelCellPosition.cs
- Column.cs
- DataGridViewRowStateChangedEventArgs.cs
- XmlExpressionDumper.cs
- EventSinkHelperWriter.cs
- ProjectionQueryOptionExpression.cs
- DbDeleteCommandTree.cs
- RealizedColumnsBlock.cs
- WorkflowQueuingService.cs
- ZipFileInfoCollection.cs
- SafeSerializationManager.cs
- _HeaderInfo.cs
- QilLoop.cs
- LinearGradientBrush.cs
- ToolStripPanelCell.cs
- XmlEntityReference.cs
- SmiXetterAccessMap.cs
- ListViewCancelEventArgs.cs
- SortAction.cs
- log.cs
- Font.cs
- IntranetCredentialPolicy.cs
- InstanceStore.cs
- DispatcherOperation.cs
- Light.cs
- JulianCalendar.cs
- Pair.cs
- RegexGroupCollection.cs
- PrintingPermissionAttribute.cs
- EventLogConfiguration.cs
- SHA256.cs
- BinaryCommonClasses.cs
- ServiceInfo.cs
- PeerTransportListenAddressConverter.cs
- WebException.cs
- ValidatingReaderNodeData.cs
- _FtpControlStream.cs
- SmiEventSink_Default.cs
- ImageField.cs
- OrderToken.cs
- SchemaHelper.cs
- CodeGroup.cs
- EntityTypeEmitter.cs
- ViewValidator.cs
- MDIControlStrip.cs
- BrowserTree.cs
- MultiTrigger.cs
- KeyGestureConverter.cs
- ExternalDataExchangeClient.cs
- ToolStripSplitStackLayout.cs
- DesignerTransactionCloseEvent.cs
- BoundingRectTracker.cs
- MultiBindingExpression.cs
- EffectiveValueEntry.cs
- Token.cs
- CloseSequenceResponse.cs
- SelectedGridItemChangedEvent.cs
- SafeNativeMethods.cs
- ThreadBehavior.cs
- ResourcePool.cs
- URLAttribute.cs
- DataGridColumnHeader.cs
- URLIdentityPermission.cs
- IPGlobalProperties.cs
- FlowDocumentReaderAutomationPeer.cs
- AccessText.cs
- EntityWrapperFactory.cs
- SmtpFailedRecipientException.cs
- Menu.cs
- StylusButton.cs
- MetadataItemSerializer.cs
- SocketCache.cs
- PriorityBinding.cs
- SystemPens.cs
- EventSetter.cs
- PersonalizablePropertyEntry.cs
- FileDataSourceCache.cs
- XmlDataImplementation.cs
- WpfPayload.cs
- Pair.cs
- InvalidEnumArgumentException.cs
- HtmlEmptyTagControlBuilder.cs
- EntityDataSourceUtil.cs
- KeyValueSerializer.cs
- DataErrorValidationRule.cs
- StickyNote.cs
- WebHttpBindingElement.cs
- DiscreteKeyFrames.cs
- PolyBezierSegmentFigureLogic.cs
- NamespaceEmitter.cs
- Int64AnimationUsingKeyFrames.cs
- ComplexTypeEmitter.cs