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
- Literal.cs
- ConfigXmlCDataSection.cs
- BitmapMetadataEnumerator.cs
- AutomationPattern.cs
- MailMessage.cs
- DataServiceHostWrapper.cs
- AffineTransform3D.cs
- XPathNavigatorKeyComparer.cs
- IgnoreFlushAndCloseStream.cs
- Vector3DAnimationUsingKeyFrames.cs
- ObjectDataSource.cs
- Transform3D.cs
- HttpRuntimeSection.cs
- RouteParser.cs
- FlowDocumentReader.cs
- WebConfigurationManager.cs
- UiaCoreApi.cs
- EntityWithKeyStrategy.cs
- ScriptControl.cs
- KeyPressEvent.cs
- arabicshape.cs
- ModulesEntry.cs
- FixedSOMTable.cs
- _SafeNetHandles.cs
- LayoutSettings.cs
- BitmapCodecInfoInternal.cs
- URLMembershipCondition.cs
- RuntimeWrappedException.cs
- PropertyPath.cs
- LineBreak.cs
- Choices.cs
- BindingsCollection.cs
- HwndAppCommandInputProvider.cs
- PropertyManager.cs
- _SSPIWrapper.cs
- DataGridViewComboBoxEditingControl.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- DecimalKeyFrameCollection.cs
- CallbackDebugBehavior.cs
- DataGridrowEditEndingEventArgs.cs
- DesignerActionUIService.cs
- CodeMemberField.cs
- DefaultBindingPropertyAttribute.cs
- OpenTypeLayoutCache.cs
- UnsafeNativeMethods.cs
- XmlUnspecifiedAttribute.cs
- DataSourceCacheDurationConverter.cs
- PageRanges.cs
- SecurityRuntime.cs
- JapaneseCalendar.cs
- BindingOperations.cs
- Win32.cs
- RetriableClipboard.cs
- SchemaImporterExtensionElementCollection.cs
- ProcessHostMapPath.cs
- WebPartDeleteVerb.cs
- XmlDictionaryString.cs
- TextDecorationCollectionConverter.cs
- WebBrowserHelper.cs
- Internal.cs
- ScriptManagerProxy.cs
- MetadataItemEmitter.cs
- DataGridViewCell.cs
- DataGridViewSelectedRowCollection.cs
- CheckBox.cs
- DaylightTime.cs
- MultiBindingExpression.cs
- ClientTargetSection.cs
- EventProxy.cs
- RegisteredArrayDeclaration.cs
- XsltQilFactory.cs
- DelegatingHeader.cs
- ContextInformation.cs
- RefreshEventArgs.cs
- SocketElement.cs
- ReachPageContentCollectionSerializerAsync.cs
- MetabaseReader.cs
- CodeRegionDirective.cs
- BindToObject.cs
- SafeFileMappingHandle.cs
- ToolStripStatusLabel.cs
- ValueTypeFixupInfo.cs
- DataBoundControlAdapter.cs
- Column.cs
- AstNode.cs
- ValueOfAction.cs
- WindowsButton.cs
- XmlSchemaValidationException.cs
- XmlSchemaIdentityConstraint.cs
- DataGridViewButtonCell.cs
- GridLengthConverter.cs
- ReadOnlyActivityGlyph.cs
- TextMetrics.cs
- OdbcInfoMessageEvent.cs
- NetCodeGroup.cs
- KnownBoxes.cs
- EntityReference.cs
- FolderBrowserDialog.cs
- PageContentCollection.cs
- DataGridViewColumn.cs