Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / EntityModel / SchemaObjectModel / KeyProperty.cs / 2 / 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
- HwndSource.cs
- DataControlImageButton.cs
- GlobalProxySelection.cs
- SettingsBindableAttribute.cs
- HostedElements.cs
- Timer.cs
- Compiler.cs
- DynamicActivityProperty.cs
- LinkedList.cs
- DisableDpiAwarenessAttribute.cs
- ContentPosition.cs
- SafeArrayRankMismatchException.cs
- MarshalDirectiveException.cs
- SourceFilter.cs
- WebHttpEndpoint.cs
- DictionaryItemsCollection.cs
- XmlAttributeCollection.cs
- SoundPlayer.cs
- ScrollBar.cs
- Constraint.cs
- CategoriesDocument.cs
- ThreadStateException.cs
- FrameSecurityDescriptor.cs
- ExpressionBindingCollection.cs
- HttpDebugHandler.cs
- sortedlist.cs
- XmlSchemaAnnotation.cs
- CodeSnippetStatement.cs
- DirtyTextRange.cs
- SqlPersonalizationProvider.cs
- FillErrorEventArgs.cs
- SecurityTokenAuthenticator.cs
- CompilationUnit.cs
- WebServiceParameterData.cs
- AuthenticationServiceManager.cs
- SqlNamer.cs
- SerialErrors.cs
- DeferrableContent.cs
- XmlDataLoader.cs
- WorkflowServiceHost.cs
- FormatterServices.cs
- DocumentSequenceHighlightLayer.cs
- FrameAutomationPeer.cs
- ToolStripScrollButton.cs
- DataBindEngine.cs
- PaperSource.cs
- SqlInternalConnectionSmi.cs
- ReaderContextStackData.cs
- PageOutputColor.cs
- DropShadowBitmapEffect.cs
- GeneralTransformGroup.cs
- WebConfigurationHost.cs
- ContractReference.cs
- XamlTreeBuilder.cs
- KeyFrames.cs
- SafeNativeMethodsCLR.cs
- IncrementalReadDecoders.cs
- ToolStripScrollButton.cs
- OdbcEnvironment.cs
- DesignerActionPropertyItem.cs
- XPathBinder.cs
- DefaultCompensation.cs
- MobileControl.cs
- GenericAuthenticationEventArgs.cs
- RelationshipManager.cs
- Form.cs
- TemplateBindingExtension.cs
- ProgressBarAutomationPeer.cs
- Win32PrintDialog.cs
- EntryPointNotFoundException.cs
- LassoSelectionBehavior.cs
- HttpApplicationFactory.cs
- ObjectSet.cs
- BatchWriter.cs
- SHA512Cng.cs
- EventProviderTraceListener.cs
- SponsorHelper.cs
- ClientRuntimeConfig.cs
- SmtpSection.cs
- DetailsViewAutoFormat.cs
- _ConnectOverlappedAsyncResult.cs
- BitmapSourceSafeMILHandle.cs
- SizeIndependentAnimationStorage.cs
- ConfigurationSection.cs
- Html32TextWriter.cs
- COM2ComponentEditor.cs
- EntityDataSourceDesigner.cs
- HiddenField.cs
- PriorityChain.cs
- MissingManifestResourceException.cs
- DetailsViewRow.cs
- DataSourceCache.cs
- ChtmlPageAdapter.cs
- FlowDocumentReaderAutomationPeer.cs
- CommandHelpers.cs
- initElementDictionary.cs
- CellPartitioner.cs
- TraceRecord.cs
- CombinedTcpChannel.cs
- PersistNameAttribute.cs