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
- HttpStaticObjectsCollectionWrapper.cs
- figurelength.cs
- SystemNetworkInterface.cs
- TrackingSection.cs
- RawAppCommandInputReport.cs
- ObjectTypeMapping.cs
- ProxyFragment.cs
- EntityParameterCollection.cs
- TokenFactoryFactory.cs
- XmlReaderSettings.cs
- SmiContext.cs
- Image.cs
- SecurityTokenSpecification.cs
- Activation.cs
- XmlSchemaElement.cs
- MimeMapping.cs
- SchemaInfo.cs
- PointHitTestResult.cs
- SqlProfileProvider.cs
- WebBrowserUriTypeConverter.cs
- DataSourceView.cs
- BamlWriter.cs
- NotFiniteNumberException.cs
- ApplicationTrust.cs
- PropertyGridEditorPart.cs
- TextCompositionManager.cs
- StreamInfo.cs
- CursorConverter.cs
- XmlHierarchicalEnumerable.cs
- XmlLanguageConverter.cs
- FaultContractInfo.cs
- HwndSourceParameters.cs
- TextChangedEventArgs.cs
- XsltInput.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- UserControlCodeDomTreeGenerator.cs
- SetIterators.cs
- Triplet.cs
- UndirectedGraph.cs
- ScriptRegistrationManager.cs
- Options.cs
- mediaeventargs.cs
- AuthenticationSection.cs
- DataPagerFieldItem.cs
- StateMachineWorkflowInstance.cs
- XappLauncher.cs
- TextEncodedRawTextWriter.cs
- FirstMatchCodeGroup.cs
- ServiceDescriptions.cs
- QilDataSource.cs
- _SafeNetHandles.cs
- SyndicationDeserializer.cs
- AssociationTypeEmitter.cs
- ResumeStoryboard.cs
- DesignerObject.cs
- AssertSection.cs
- DesignerLoader.cs
- AnimationStorage.cs
- PersonalizationStateInfoCollection.cs
- oledbmetadatacolumnnames.cs
- SrgsRuleRef.cs
- CroppedBitmap.cs
- SchemaNamespaceManager.cs
- TabletCollection.cs
- MobileContainerDesigner.cs
- PropertyMetadata.cs
- BasicKeyConstraint.cs
- RestHandler.cs
- MissingSatelliteAssemblyException.cs
- PageAsyncTask.cs
- FileCodeGroup.cs
- ClientProxyGenerator.cs
- ExceptionRoutedEventArgs.cs
- RijndaelManaged.cs
- TraceSource.cs
- MeasureData.cs
- EventWaitHandleSecurity.cs
- ComplexObject.cs
- ZipIOLocalFileBlock.cs
- CompiledRegexRunner.cs
- CharacterMetricsDictionary.cs
- PositiveTimeSpanValidator.cs
- TriggerCollection.cs
- CellPartitioner.cs
- Configuration.cs
- HandlerWithFactory.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- DataListItem.cs
- DrawingDrawingContext.cs
- SpeechRecognizer.cs
- InheritedPropertyChangedEventArgs.cs
- IODescriptionAttribute.cs
- IssuanceLicense.cs
- EnumerableCollectionView.cs
- ReverseComparer.cs
- RuntimeEnvironment.cs
- SchemaInfo.cs
- NamedObjectList.cs
- Version.cs
- ImportCatalogPart.cs