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
- PingReply.cs
- EqualityComparer.cs
- EntityDataSourceWrapper.cs
- ISessionStateStore.cs
- XmlSerializerOperationGenerator.cs
- ComponentEditorForm.cs
- SdlChannelSink.cs
- rsa.cs
- TemplateInstanceAttribute.cs
- FormViewDeleteEventArgs.cs
- RightsManagementEncryptionTransform.cs
- Boolean.cs
- ExpressionNormalizer.cs
- LineMetrics.cs
- HtmlGenericControl.cs
- BinaryMessageFormatter.cs
- ChannelManager.cs
- SetterBase.cs
- XmlSchemaSet.cs
- EntityClassGenerator.cs
- ScanQueryOperator.cs
- ScaleTransform3D.cs
- ObjectTag.cs
- BitmapCacheBrush.cs
- SignHashRequest.cs
- RegexInterpreter.cs
- StaticDataManager.cs
- QilFactory.cs
- WebServiceHandlerFactory.cs
- ModuleConfigurationInfo.cs
- TextModifierScope.cs
- ClientProtocol.cs
- XmlStreamStore.cs
- ListenDesigner.cs
- Metafile.cs
- MenuItem.cs
- ConfigXmlSignificantWhitespace.cs
- ObjectParameterCollection.cs
- _ServiceNameStore.cs
- VirtualPathProvider.cs
- PropVariant.cs
- httpserverutility.cs
- SessionEndingCancelEventArgs.cs
- GB18030Encoding.cs
- DetailsViewAutoFormat.cs
- ToolStrip.cs
- AsyncOperationManager.cs
- ArrayHelper.cs
- Help.cs
- WebContentFormatHelper.cs
- RenderingBiasValidation.cs
- ProfileInfo.cs
- OleDbInfoMessageEvent.cs
- TextWriter.cs
- PermissionSetEnumerator.cs
- SqlWebEventProvider.cs
- ZoneIdentityPermission.cs
- UnauthorizedWebPart.cs
- XmlTypeAttribute.cs
- ConditionalBranch.cs
- wmiprovider.cs
- ResourceDescriptionAttribute.cs
- MailMessageEventArgs.cs
- DefaultTextStoreTextComposition.cs
- HyperLinkStyle.cs
- JsonDataContract.cs
- PointCollectionConverter.cs
- DecimalAnimationUsingKeyFrames.cs
- Triangle.cs
- InputEventArgs.cs
- Site.cs
- LocalValueEnumerator.cs
- QuotedPrintableStream.cs
- CodeTypeReferenceCollection.cs
- StrokeDescriptor.cs
- ImageInfo.cs
- StylusButtonCollection.cs
- ValidationVisibilityAttribute.cs
- mactripleDES.cs
- ServiceDurableInstanceContextProvider.cs
- DataGridViewColumnCollection.cs
- TypeUsage.cs
- ValueChangedEventManager.cs
- NopReturnReader.cs
- RefreshEventArgs.cs
- ContextInformation.cs
- RegistryPermission.cs
- ComplexObject.cs
- ExpandCollapseProviderWrapper.cs
- MenuEventArgs.cs
- CodeIterationStatement.cs
- SymLanguageType.cs
- MonthChangedEventArgs.cs
- StoryFragments.cs
- WebPartMovingEventArgs.cs
- RegexMatch.cs
- EnumMemberAttribute.cs
- RefreshInfo.cs
- ChtmlCommandAdapter.cs
- DependencyPropertyHelper.cs