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
- TextBoxBase.cs
- UmAlQuraCalendar.cs
- SqlDataSourceCommandParser.cs
- ButtonChrome.cs
- BuildProvidersCompiler.cs
- RemotingAttributes.cs
- TextureBrush.cs
- GlobalId.cs
- BinHexEncoder.cs
- RelatedView.cs
- FrameDimension.cs
- KnownIds.cs
- DynamicRouteExpression.cs
- MenuEventArgs.cs
- Timer.cs
- Variable.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ToolStripTextBox.cs
- DbTypeMap.cs
- RadioButtonList.cs
- SettingsBindableAttribute.cs
- GenericsInstances.cs
- LeaseManager.cs
- CultureInfoConverter.cs
- CompModHelpers.cs
- XPathBinder.cs
- WindowsRegion.cs
- AssociationTypeEmitter.cs
- StrokeNodeEnumerator.cs
- PointLight.cs
- VisualCollection.cs
- FileAuthorizationModule.cs
- WindowsScrollBarBits.cs
- Encoder.cs
- SqlAliasesReferenced.cs
- PageTheme.cs
- SqlDataSourceCache.cs
- DateRangeEvent.cs
- Properties.cs
- KeyNotFoundException.cs
- Setter.cs
- GeneratedCodeAttribute.cs
- RenderDataDrawingContext.cs
- FragmentNavigationEventArgs.cs
- XmlBufferReader.cs
- ListBox.cs
- QilBinary.cs
- CellNormalizer.cs
- ContentElementAutomationPeer.cs
- CookieProtection.cs
- DelayDesigner.cs
- FormatControl.cs
- assemblycache.cs
- SqlDataSourceWizardForm.cs
- CapiSafeHandles.cs
- VisualTarget.cs
- TreeNode.cs
- ReferencedAssembly.cs
- FunctionDetailsReader.cs
- FlowDocumentReaderAutomationPeer.cs
- UIElement3D.cs
- BinaryObjectInfo.cs
- SpecularMaterial.cs
- StringFreezingAttribute.cs
- WebException.cs
- DbProviderFactories.cs
- DataReaderContainer.cs
- CodeObjectCreateExpression.cs
- MultiView.cs
- RecordBuilder.cs
- HtmlControl.cs
- WebZone.cs
- TreeBuilder.cs
- SiteMapDataSource.cs
- ContractMapping.cs
- DatePickerTextBox.cs
- EpmHelper.cs
- ReadOnlyCollection.cs
- XmlSchemaComplexContentExtension.cs
- NativeMethodsOther.cs
- ResetableIterator.cs
- DataGridSortCommandEventArgs.cs
- ManipulationDeltaEventArgs.cs
- CanonicalFontFamilyReference.cs
- SafeThemeHandle.cs
- X509Certificate.cs
- ViewStateException.cs
- WizardForm.cs
- TabletDevice.cs
- TextTreeExtractElementUndoUnit.cs
- DataTableCollection.cs
- CLSCompliantAttribute.cs
- SqlBuffer.cs
- CapabilitiesAssignment.cs
- DBCommandBuilder.cs
- ToolStripSeparator.cs
- SystemWebCachingSectionGroup.cs
- _NetworkingPerfCounters.cs
- DbProviderFactories.cs
- GridViewRowEventArgs.cs