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
- SyndicationDeserializer.cs
- HMACSHA512.cs
- LogRestartAreaEnumerator.cs
- PixelShader.cs
- ActivationProxy.cs
- FormsAuthenticationModule.cs
- Themes.cs
- UnsafeNativeMethods.cs
- RequestResizeEvent.cs
- ServiceProviders.cs
- WorkflowServiceBuildProvider.cs
- SingleStorage.cs
- DesignerActionKeyboardBehavior.cs
- SQLBoolean.cs
- RepeaterCommandEventArgs.cs
- FileAuthorizationModule.cs
- CommandBindingCollection.cs
- EntityConnectionStringBuilderItem.cs
- CompletedAsyncResult.cs
- linebase.cs
- X509CertificateInitiatorServiceCredential.cs
- BoundingRectTracker.cs
- MetadataItemCollectionFactory.cs
- XamlSerializer.cs
- CreatingCookieEventArgs.cs
- TransportReplyChannelAcceptor.cs
- ColorDialog.cs
- ValidationPropertyAttribute.cs
- InvokeBase.cs
- RawStylusInput.cs
- XPathAxisIterator.cs
- TypeExtensions.cs
- ScriptDescriptor.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- LZCodec.cs
- XmlNamedNodeMap.cs
- MemberPath.cs
- Condition.cs
- WindowsListBox.cs
- ObfuscationAttribute.cs
- CustomErrorCollection.cs
- Point3DConverter.cs
- LinkAreaEditor.cs
- BufferedReadStream.cs
- MaterialCollection.cs
- AttributeConverter.cs
- SoapMessage.cs
- FontEmbeddingManager.cs
- CommandExpr.cs
- AnnotationResourceCollection.cs
- DescendantQuery.cs
- LabelDesigner.cs
- XmlExceptionHelper.cs
- OrderedHashRepartitionStream.cs
- BinHexDecoder.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- TypedColumnHandler.cs
- COAUTHIDENTITY.cs
- DependentList.cs
- ConcurrencyMode.cs
- Convert.cs
- DocumentsTrace.cs
- RuleSetBrowserDialog.cs
- ColorTranslator.cs
- ConfigurationStrings.cs
- DateRangeEvent.cs
- SqlNodeTypeOperators.cs
- GetPageNumberCompletedEventArgs.cs
- SortedSetDebugView.cs
- RightsManagementPermission.cs
- MailWebEventProvider.cs
- JobPageOrder.cs
- RTLAwareMessageBox.cs
- WindowsListViewScroll.cs
- ProxyWebPartManager.cs
- TextClipboardData.cs
- Stopwatch.cs
- XmlElementAttributes.cs
- _ListenerRequestStream.cs
- SelectionItemProviderWrapper.cs
- SystemTcpConnection.cs
- ContentPropertyAttribute.cs
- DynamicObjectAccessor.cs
- XmlArrayItemAttributes.cs
- TransactionScopeDesigner.cs
- dtdvalidator.cs
- ToolboxComponentsCreatedEventArgs.cs
- BaseProcessor.cs
- SupportingTokenSecurityTokenResolver.cs
- OdbcEnvironment.cs
- BamlBinaryReader.cs
- SudsParser.cs
- WebEventCodes.cs
- PathParser.cs
- KernelTypeValidation.cs
- WindowsFormsHostPropertyMap.cs
- DtdParser.cs
- FieldAccessException.cs
- ViewKeyConstraint.cs
- BoundsDrawingContextWalker.cs