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
- TraceFilter.cs
- DesignTimeTemplateParser.cs
- PathFigure.cs
- DependencyPropertyDescriptor.cs
- Int64Storage.cs
- DependencyObjectPropertyDescriptor.cs
- GeometryGroup.cs
- StreamUpdate.cs
- GenericPrincipal.cs
- CompilerParameters.cs
- DataGridParentRows.cs
- DataListItem.cs
- Transform.cs
- AssemblyAttributes.cs
- FrameworkElementFactory.cs
- BreakSafeBase.cs
- BitmapEffectDrawingContent.cs
- IntegerValidatorAttribute.cs
- FixedPage.cs
- Util.cs
- ResponseStream.cs
- InputLangChangeRequestEvent.cs
- WorkflowInstanceContextProvider.cs
- SiteMapNodeCollection.cs
- formatter.cs
- FontEditor.cs
- JavaScriptObjectDeserializer.cs
- Script.cs
- LogAppendAsyncResult.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DescendantBaseQuery.cs
- MimeTypeMapper.cs
- ReadOnlyDictionary.cs
- X509Chain.cs
- EncodingTable.cs
- ColorContextHelper.cs
- ServiceHostingEnvironment.cs
- PanelContainerDesigner.cs
- XsdDateTime.cs
- GCHandleCookieTable.cs
- OleDbReferenceCollection.cs
- FilteredAttributeCollection.cs
- HijriCalendar.cs
- QueryOutputWriterV1.cs
- XmlSignificantWhitespace.cs
- CategoryGridEntry.cs
- ProtectedConfigurationSection.cs
- QuotedPrintableStream.cs
- RuntimeConfigLKG.cs
- _LazyAsyncResult.cs
- UserValidatedEventArgs.cs
- UserNamePasswordValidator.cs
- ObjectIDGenerator.cs
- DataFormats.cs
- FloaterBaseParagraph.cs
- XmlRootAttribute.cs
- ComponentTray.cs
- SimpleMailWebEventProvider.cs
- ValueUnavailableException.cs
- BreakRecordTable.cs
- AssociationEndMember.cs
- UsernameTokenFactoryCredential.cs
- DebuggerService.cs
- EntityModelBuildProvider.cs
- VBIdentifierNameEditor.cs
- ExtenderHelpers.cs
- DataServiceQueryOfT.cs
- JsonReader.cs
- prompt.cs
- OleStrCAMarshaler.cs
- ProcessExitedException.cs
- FileEnumerator.cs
- LOSFormatter.cs
- XmlSchemaGroup.cs
- _ConnectOverlappedAsyncResult.cs
- SapiInterop.cs
- ScrollEvent.cs
- Pair.cs
- HtmlEncodedRawTextWriter.cs
- TextEmbeddedObject.cs
- MembershipPasswordException.cs
- WindowsGraphicsCacheManager.cs
- SubMenuStyleCollection.cs
- TraceContextRecord.cs
- MobilePage.cs
- Ref.cs
- OutputCacheProfile.cs
- IPAddressCollection.cs
- MobileControlDesigner.cs
- GreenMethods.cs
- EmptyReadOnlyDictionaryInternal.cs
- filewebrequest.cs
- UndoEngine.cs
- ParserExtension.cs
- TextTreeTextBlock.cs
- DocumentCollection.cs
- IndexOutOfRangeException.cs
- Html32TextWriter.cs
- FunctionImportMapping.cs
- XamlTreeBuilderBamlRecordWriter.cs