Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ServiceDescriptionSerializer.cs
- FixedTextView.cs
- FixedSOMLineRanges.cs
- DbDataAdapter.cs
- Bezier.cs
- CodeConstructor.cs
- TypeConverterAttribute.cs
- TableTextElementCollectionInternal.cs
- ImageMetadata.cs
- StylusSystemGestureEventArgs.cs
- ForAllOperator.cs
- Accessible.cs
- MemberJoinTreeNode.cs
- TextRangeEdit.cs
- PropertyGrid.cs
- HttpResponseWrapper.cs
- DataGridViewRowHeaderCell.cs
- XmlSerializerFactory.cs
- AuthStoreRoleProvider.cs
- SafeBitVector32.cs
- Grant.cs
- XmlChildNodes.cs
- ProbeMatchesApril2005.cs
- RecordsAffectedEventArgs.cs
- SoapTypeAttribute.cs
- CatalogZoneBase.cs
- QueryGeneratorBase.cs
- ConstraintConverter.cs
- WorkflowMessageEventHandler.cs
- LineServicesRun.cs
- HScrollProperties.cs
- InternalResources.cs
- Int32RectConverter.cs
- GridViewPageEventArgs.cs
- SchemaDeclBase.cs
- ChannelServices.cs
- ProxyWebPart.cs
- TextMarkerSource.cs
- WebBrowserContainer.cs
- UndoManager.cs
- ManualResetEvent.cs
- DetailsViewModeEventArgs.cs
- SelectorItemAutomationPeer.cs
- Token.cs
- ItemCollectionEditor.cs
- EntityTypeBase.cs
- SiteMapProvider.cs
- COAUTHIDENTITY.cs
- RowUpdatingEventArgs.cs
- StateDesignerConnector.cs
- FlowDocumentPageViewerAutomationPeer.cs
- TextEditorCopyPaste.cs
- BamlCollectionHolder.cs
- NumberFormatter.cs
- PolicyValidationException.cs
- UpDownEvent.cs
- XmlSchemaImport.cs
- URI.cs
- TailPinnedEventArgs.cs
- CSharpCodeProvider.cs
- ProtocolsConfigurationEntry.cs
- XmlElement.cs
- GreenMethods.cs
- StatusBar.cs
- Native.cs
- EntityDataSourceStatementEditor.cs
- FilterableData.cs
- URI.cs
- AnnotationHelper.cs
- TableHeaderCell.cs
- AvTraceDetails.cs
- COM2ExtendedBrowsingHandler.cs
- bidPrivateBase.cs
- MenuCommandService.cs
- CommunicationObject.cs
- ComplexBindingPropertiesAttribute.cs
- SqlGatherConsumedAliases.cs
- WebCategoryAttribute.cs
- UnknownBitmapEncoder.cs
- PersonalizationStateInfo.cs
- DataGridViewCellStyleConverter.cs
- ProcessInputEventArgs.cs
- MimeObjectFactory.cs
- WebBodyFormatMessageProperty.cs
- SegmentTree.cs
- SplitterPanelDesigner.cs
- ComboBoxRenderer.cs
- TheQuery.cs
- IISUnsafeMethods.cs
- MetadataItem_Static.cs
- DataSourceDesigner.cs
- BitmapEffectDrawing.cs
- FeatureSupport.cs
- PointCollectionValueSerializer.cs
- Window.cs
- XmlAnyAttributeAttribute.cs
- ErrorFormatterPage.cs
- RouteItem.cs
- Menu.cs
- TextBox.cs