Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Validation / BasicKeyConstraint.cs / 1305376 / BasicKeyConstraint.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Mapping.ViewGeneration.Structures; using System.Collections.Generic; namespace System.Data.Mapping.ViewGeneration.Validation { using BasicSchemaConstraints = SchemaConstraints; // Class representing a key constraint on the basic cell relations internal class BasicKeyConstraint : KeyConstraint { #region Constructor // Constructs a key constraint for the given relation and keyslots internal BasicKeyConstraint(BasicCellRelation relation, IEnumerable keySlots) : base(relation, keySlots, MemberProjectedSlot.SpecificEqualityComparer) { } #endregion #region Methods // effects: Propagates this constraint from the basic cell relation // to the corresponding view cell relation and returns the new constraint // If all the key slots are not being projected, returns null internal ViewKeyConstraint Propagate() { ViewCellRelation viewCellRelation = CellRelation.ViewCellRelation; // If all slots appear in the projection, propagate key constraint List viewSlots = new List (); foreach (MemberProjectedSlot keySlot in KeySlots) { ViewCellSlot viewCellSlot = viewCellRelation.LookupViewSlot(keySlot); if (viewCellSlot == null) { // Slot is missing -- no key constraint on the view relation return null; } viewSlots.Add(viewCellSlot); } // Create a key on view relation ViewKeyConstraint viewKeyConstraint = new ViewKeyConstraint(viewCellRelation, viewSlots); return viewKeyConstraint; } #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
- HTTPNotFoundHandler.cs
- Html32TextWriter.cs
- XamlReader.cs
- CompareInfo.cs
- TransactionTable.cs
- EventInfo.cs
- SHA512CryptoServiceProvider.cs
- SoapCodeExporter.cs
- DataConnectionHelper.cs
- Task.cs
- SqlTypeConverter.cs
- PenThreadWorker.cs
- NTAccount.cs
- HttpModuleAction.cs
- TagPrefixInfo.cs
- PackageFilter.cs
- ProxyFragment.cs
- Property.cs
- ErrorEventArgs.cs
- Point3DKeyFrameCollection.cs
- ZeroOpNode.cs
- ClassImporter.cs
- TransformGroup.cs
- MetafileHeaderEmf.cs
- BamlLocalizationDictionary.cs
- XmlAutoDetectWriter.cs
- DBCommand.cs
- OperatorExpressions.cs
- CompressionTransform.cs
- ContextMenuAutomationPeer.cs
- CookieProtection.cs
- ObjectAnimationUsingKeyFrames.cs
- DataGridViewBand.cs
- BulletedListEventArgs.cs
- ConnectionManagementElement.cs
- ExpressionPrefixAttribute.cs
- Baml2006ReaderSettings.cs
- __Error.cs
- CLSCompliantAttribute.cs
- AliasedSlot.cs
- XmlMessageFormatter.cs
- RequestCacheValidator.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- XMLSyntaxException.cs
- ListViewItem.cs
- WebPageTraceListener.cs
- WebPartHeaderCloseVerb.cs
- NavigationFailedEventArgs.cs
- ActivityCodeDomSerializationManager.cs
- PictureBoxDesigner.cs
- ModelItemDictionaryImpl.cs
- RangeValuePattern.cs
- InstanceKeyCollisionException.cs
- Padding.cs
- TableLayoutPanelResizeGlyph.cs
- DependencyObject.cs
- PenThread.cs
- _SpnDictionary.cs
- BreakRecordTable.cs
- XmlDownloadManager.cs
- ObjectConverter.cs
- Directory.cs
- WebException.cs
- OracleMonthSpan.cs
- initElementDictionary.cs
- StorageEntityTypeMapping.cs
- XmlDataContract.cs
- EntityContainerEntitySetDefiningQuery.cs
- ArrayConverter.cs
- BamlMapTable.cs
- VectorCollectionValueSerializer.cs
- AsymmetricKeyExchangeFormatter.cs
- KeyValueConfigurationCollection.cs
- PropertyInfoSet.cs
- DbXmlEnabledProviderManifest.cs
- RectangleHotSpot.cs
- WriteTimeStream.cs
- AnonymousIdentificationSection.cs
- PropertyFilterAttribute.cs
- WebPartUserCapability.cs
- Int16Animation.cs
- DoWhile.cs
- ExternalFile.cs
- CompiledQuery.cs
- SqlBulkCopyColumnMapping.cs
- RoutedEventArgs.cs
- CodePrimitiveExpression.cs
- SiteMapDataSourceView.cs
- SimpleLine.cs
- TimeoutTimer.cs
- BooleanFunctions.cs
- CodeGenerator.cs
- AliasGenerator.cs
- _IPv6Address.cs
- AppDomainFactory.cs
- BitmapDecoder.cs
- XmlDataSourceNodeDescriptor.cs
- BindStream.cs
- FixedDocumentPaginator.cs
- ReferentialConstraintRoleElement.cs