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
- NCryptSafeHandles.cs
- DecimalAnimationUsingKeyFrames.cs
- ScriptModule.cs
- Models.cs
- XmlChoiceIdentifierAttribute.cs
- ProxyAttribute.cs
- ForeignKeyConstraint.cs
- DialogWindow.cs
- TableLayoutPanelCellPosition.cs
- StringArrayConverter.cs
- LabelLiteral.cs
- XmlDesignerDataSourceView.cs
- SafeRightsManagementQueryHandle.cs
- DesignTimeSiteMapProvider.cs
- SmtpDigestAuthenticationModule.cs
- TextTrailingWordEllipsis.cs
- Events.cs
- OrderedDictionaryStateHelper.cs
- AutomationProperties.cs
- Int16AnimationUsingKeyFrames.cs
- ElementHostAutomationPeer.cs
- DataGridViewSelectedRowCollection.cs
- XmlDictionaryWriter.cs
- WorkflowMarkupSerializationProvider.cs
- CodeDelegateInvokeExpression.cs
- ReadOnlyHierarchicalDataSourceView.cs
- WebPartConnectionsCancelEventArgs.cs
- QuaternionValueSerializer.cs
- X509Utils.cs
- XamlStyleSerializer.cs
- PrintPageEvent.cs
- SafeHandles.cs
- XamlRtfConverter.cs
- ToolBar.cs
- LinqExpressionNormalizer.cs
- FileSystemWatcher.cs
- TraversalRequest.cs
- HtmlInputButton.cs
- WebPartManager.cs
- HwndSourceParameters.cs
- DNS.cs
- TraceHandler.cs
- DbFunctionCommandTree.cs
- CodeLinePragma.cs
- TraceEventCache.cs
- SmiEventSink.cs
- XNodeValidator.cs
- CompositeKey.cs
- Pointer.cs
- DesignUtil.cs
- Cursors.cs
- ApplicationDirectoryMembershipCondition.cs
- CodeAttributeArgumentCollection.cs
- FileDetails.cs
- LockRecursionException.cs
- QilFunction.cs
- TrackingMemoryStreamFactory.cs
- Command.cs
- XmlSchemaSimpleContent.cs
- HitTestDrawingContextWalker.cs
- UIElementCollection.cs
- Animatable.cs
- SystemBrushes.cs
- TabControlToolboxItem.cs
- StaticExtensionConverter.cs
- CompiledIdentityConstraint.cs
- CoTaskMemHandle.cs
- OleDbMetaDataFactory.cs
- KoreanLunisolarCalendar.cs
- handlecollector.cs
- CreatingCookieEventArgs.cs
- TextDecoration.cs
- StyleSheet.cs
- PersistenceTypeAttribute.cs
- MobileTemplatedControlDesigner.cs
- SchemaSetCompiler.cs
- Window.cs
- MethodAccessException.cs
- TimelineGroup.cs
- RangeBaseAutomationPeer.cs
- XmlReflectionImporter.cs
- SecurityDescriptor.cs
- ToolStripItemTextRenderEventArgs.cs
- NullExtension.cs
- ColorPalette.cs
- ClassGenerator.cs
- DataGridViewRowHeaderCell.cs
- ValidationPropertyAttribute.cs
- InkPresenter.cs
- OracleException.cs
- CollectionsUtil.cs
- XamlStream.cs
- Path.cs
- Menu.cs
- Avt.cs
- UserPreferenceChangingEventArgs.cs
- ConfigurationValidatorBase.cs
- OverloadGroupAttribute.cs
- SystemFonts.cs
- KnownTypesProvider.cs