Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- // // 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
- VisualStyleInformation.cs
- XmlILAnnotation.cs
- SecurityDescriptor.cs
- Token.cs
- ListBoxItemWrapperAutomationPeer.cs
- Wildcard.cs
- WinFormsComponentEditor.cs
- DBCommand.cs
- MatrixAnimationBase.cs
- XmlTextEncoder.cs
- CachedCompositeFamily.cs
- TypeTypeConverter.cs
- ConfigurationSectionCollection.cs
- PieceDirectory.cs
- Transform3DGroup.cs
- CursorInteropHelper.cs
- XmlDomTextWriter.cs
- Visitors.cs
- ChtmlSelectionListAdapter.cs
- SingleTagSectionHandler.cs
- ToolStripOverflow.cs
- DbParameterCollectionHelper.cs
- ProcessModelSection.cs
- UrlMappingsSection.cs
- Vars.cs
- HostSecurityManager.cs
- TabPage.cs
- TableItemPattern.cs
- BufferedStream.cs
- RelatedCurrencyManager.cs
- WindowsScrollBar.cs
- WpfKnownMemberInvoker.cs
- HttpListenerContext.cs
- TickBar.cs
- XmlSchemaAttribute.cs
- AutoGeneratedField.cs
- Paragraph.cs
- WindowAutomationPeer.cs
- RuntimeHelpers.cs
- OleDbMetaDataFactory.cs
- BufferedGraphics.cs
- CancellationToken.cs
- DelayedRegex.cs
- SecurityPolicySection.cs
- SelectionChangedEventArgs.cs
- ControlPager.cs
- SafeNativeMethods.cs
- SoundPlayerAction.cs
- ThicknessAnimationBase.cs
- QilChoice.cs
- ProcessRequestAsyncResult.cs
- webproxy.cs
- TableSectionStyle.cs
- HwndSourceParameters.cs
- InputLanguageManager.cs
- Authorization.cs
- IisTraceWebEventProvider.cs
- ServiceModelEnumValidatorAttribute.cs
- CodeTypeDelegate.cs
- EventLogPermissionEntry.cs
- ISAPIRuntime.cs
- PassportAuthenticationEventArgs.cs
- _CacheStreams.cs
- WindowsEditBox.cs
- GridViewColumnHeaderAutomationPeer.cs
- IPipelineRuntime.cs
- FilePresentation.cs
- OracleString.cs
- InvalidOleVariantTypeException.cs
- BaseConfigurationRecord.cs
- IpcServerChannel.cs
- ContractTypeNameCollection.cs
- CatalogPartCollection.cs
- StandardBindingOptionalReliableSessionElement.cs
- TabletDeviceInfo.cs
- XmlTextReader.cs
- ActivityValidator.cs
- EntityDataSourceViewSchema.cs
- ProcessRequestArgs.cs
- DataTableReaderListener.cs
- QuadraticBezierSegment.cs
- ResourceProperty.cs
- PersonalizationStateQuery.cs
- DataColumnPropertyDescriptor.cs
- HttpCachePolicyWrapper.cs
- LinqDataSourceValidationException.cs
- AmbientLight.cs
- FontDialog.cs
- XmlDataImplementation.cs
- ChangeToolStripParentVerb.cs
- LocalBuilder.cs
- ObjectAnimationUsingKeyFrames.cs
- ScriptingWebServicesSectionGroup.cs
- FragmentQueryProcessor.cs
- AgileSafeNativeMemoryHandle.cs
- DecimalAnimationBase.cs
- Pair.cs
- messageonlyhwndwrapper.cs
- Point.cs
- LogRestartAreaEnumerator.cs