Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PathTooLongException.cs
- WhitespaceRuleLookup.cs
- CngKey.cs
- SizeChangedEventArgs.cs
- IChannel.cs
- UnmanagedHandle.cs
- ValueTypeFixupInfo.cs
- OdbcUtils.cs
- DesignBindingPropertyDescriptor.cs
- CompilationPass2TaskInternal.cs
- SessionStateSection.cs
- ChtmlFormAdapter.cs
- formatter.cs
- BaseCodePageEncoding.cs
- PtsContext.cs
- FormatterServicesNoSerializableCheck.cs
- Bidi.cs
- SafeCancelMibChangeNotify.cs
- Bidi.cs
- ContentDisposition.cs
- Command.cs
- UITypeEditors.cs
- SchemaConstraints.cs
- ObjectStorage.cs
- XmlWrappingReader.cs
- ArraySortHelper.cs
- CallContext.cs
- CustomError.cs
- WebPartConnectVerb.cs
- ReflectTypeDescriptionProvider.cs
- ObjRef.cs
- StylusPointPropertyInfoDefaults.cs
- DecodeHelper.cs
- UnsafeNativeMethods.cs
- XmlSchemaSimpleTypeUnion.cs
- URIFormatException.cs
- followingsibling.cs
- ViewManager.cs
- ComPlusAuthorization.cs
- ResourceProviderFactory.cs
- TemplateInstanceAttribute.cs
- ReaderWriterLock.cs
- ResourceAssociationSetEnd.cs
- SqlTypeConverter.cs
- XmlSerializerAssemblyAttribute.cs
- TransportBindingElement.cs
- RuntimeConfig.cs
- ParallelEnumerable.cs
- HttpWriter.cs
- TableLayoutPanel.cs
- EDesignUtil.cs
- GeneralTransform.cs
- HttpCookiesSection.cs
- GPPOINTF.cs
- DataFormats.cs
- FilterQueryOptionExpression.cs
- SqlAggregateChecker.cs
- ControlValuePropertyAttribute.cs
- BaseCodeDomTreeGenerator.cs
- DataRowComparer.cs
- FileIOPermission.cs
- ExpressionEditor.cs
- KeyedHashAlgorithm.cs
- WeakRefEnumerator.cs
- ManagedCodeMarkers.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- LinqDataSourceStatusEventArgs.cs
- Double.cs
- DescendantBaseQuery.cs
- FixedTextPointer.cs
- CodeConditionStatement.cs
- ConstrainedDataObject.cs
- TypeSemantics.cs
- OrderByBuilder.cs
- CacheOutputQuery.cs
- DiagnosticsElement.cs
- CodeGenerator.cs
- VisualBasicHelper.cs
- OleDbInfoMessageEvent.cs
- RequiredFieldValidator.cs
- ImageBrush.cs
- Parser.cs
- View.cs
- ShapingEngine.cs
- InProcStateClientManager.cs
- SmiGettersStream.cs
- TableLayoutPanel.cs
- CacheManager.cs
- dbenumerator.cs
- HierarchicalDataBoundControl.cs
- MenuItemStyleCollectionEditor.cs
- PointConverter.cs
- GeometryConverter.cs
- StartUpEventArgs.cs
- OdbcCommand.cs
- GatewayDefinition.cs
- StatusBarItem.cs
- Monitor.cs
- DataGridViewCellLinkedList.cs
- SQLDateTimeStorage.cs