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
- SerializationStore.cs
- BinaryConverter.cs
- ConfigurationLocationCollection.cs
- XmlResolver.cs
- MimeWriter.cs
- RuntimeCompatibilityAttribute.cs
- RootBrowserWindow.cs
- ReversePositionQuery.cs
- ObjRef.cs
- FormsAuthenticationUserCollection.cs
- PointAnimationBase.cs
- ToolStripGrip.cs
- ContentElement.cs
- TableRowGroupCollection.cs
- PeerCollaborationPermission.cs
- RequestCache.cs
- DebugController.cs
- Descriptor.cs
- BlockUIContainer.cs
- RichTextBoxConstants.cs
- NonSerializedAttribute.cs
- Soap12ProtocolImporter.cs
- SourceChangedEventArgs.cs
- TokenFactoryCredential.cs
- Html32TextWriter.cs
- CqlBlock.cs
- ModifierKeysConverter.cs
- LassoSelectionBehavior.cs
- InheritedPropertyChangedEventArgs.cs
- CodeLinePragma.cs
- XmlDocumentFragment.cs
- AssemblyBuilder.cs
- SvcMapFileLoader.cs
- XmlSchemaSequence.cs
- MenuItemBinding.cs
- X509Chain.cs
- EmptyEnumerator.cs
- TypeInformation.cs
- ChangeInterceptorAttribute.cs
- MobileFormsAuthentication.cs
- ImagingCache.cs
- _SafeNetHandles.cs
- SimpleFieldTemplateFactory.cs
- XmlNavigatorFilter.cs
- DelimitedListTraceListener.cs
- ClonableStack.cs
- UDPClient.cs
- SemanticAnalyzer.cs
- TextRunCacheImp.cs
- AssemblyCollection.cs
- DesignSurfaceEvent.cs
- TextDecorationCollection.cs
- CapabilitiesAssignment.cs
- PKCS1MaskGenerationMethod.cs
- Soap12ServerProtocol.cs
- EntityWithKeyStrategy.cs
- AssemblyAssociatedContentFileAttribute.cs
- ListContractAdapter.cs
- HtmlTableRowCollection.cs
- SchemaMapping.cs
- UIElementHelper.cs
- WebPartAuthorizationEventArgs.cs
- ValueType.cs
- ImportContext.cs
- JoinSymbol.cs
- TemplatedControlDesigner.cs
- DisplayMemberTemplateSelector.cs
- XmlCharCheckingReader.cs
- GenerateTemporaryAssemblyTask.cs
- SemanticAnalyzer.cs
- RemoteArgument.cs
- XPathArrayIterator.cs
- CodeAttributeDeclaration.cs
- CompositeDispatchFormatter.cs
- OdbcError.cs
- FixedMaxHeap.cs
- WebPartEditorApplyVerb.cs
- ColumnCollection.cs
- XmlSignificantWhitespace.cs
- SoapElementAttribute.cs
- ObjectDataSourceView.cs
- PointCollection.cs
- CodeSnippetTypeMember.cs
- StringDictionary.cs
- WebPartAddingEventArgs.cs
- SweepDirectionValidation.cs
- Rect3D.cs
- ZipIOBlockManager.cs
- RepeaterDataBoundAdapter.cs
- JoinCqlBlock.cs
- AtomServiceDocumentSerializer.cs
- ArcSegment.cs
- MediaPlayerState.cs
- HashHelper.cs
- BStrWrapper.cs
- Typeface.cs
- TextRunCache.cs
- RoleManagerEventArgs.cs
- DecoderBestFitFallback.cs
- FormsAuthenticationModule.cs