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
- WindowsStatusBar.cs
- BulletedListDesigner.cs
- ApplicationBuildProvider.cs
- TraceContext.cs
- InstanceLockTracking.cs
- Attributes.cs
- MsmqIntegrationProcessProtocolHandler.cs
- WebPartPersonalization.cs
- BaseProcessProtocolHandler.cs
- SQLInt32Storage.cs
- CompoundFileReference.cs
- InternalDispatchObject.cs
- AuthenticationConfig.cs
- DirectoryObjectSecurity.cs
- SoapReflectionImporter.cs
- FieldDescriptor.cs
- RemotingException.cs
- RepeatButton.cs
- figurelengthconverter.cs
- Point3D.cs
- PathData.cs
- SoapExtensionImporter.cs
- PriorityQueue.cs
- Object.cs
- SweepDirectionValidation.cs
- FixedDSBuilder.cs
- WindowsListViewItem.cs
- HttpServerVarsCollection.cs
- SaveFileDialog.cs
- ListBase.cs
- AuthenticationModuleElementCollection.cs
- FileCodeGroup.cs
- FieldToken.cs
- StateWorkerRequest.cs
- PenLineJoinValidation.cs
- SmtpTransport.cs
- XsdDateTime.cs
- RectAnimation.cs
- fixedPageContentExtractor.cs
- WindowsContainer.cs
- DefaultHttpHandler.cs
- SolidColorBrush.cs
- UserPersonalizationStateInfo.cs
- WebPartPersonalization.cs
- DocumentViewerConstants.cs
- DataSourceControl.cs
- ConfigurationManagerInternalFactory.cs
- FileClassifier.cs
- WindowsTokenRoleProvider.cs
- OleDbSchemaGuid.cs
- DataGridViewTextBoxColumn.cs
- RelatedCurrencyManager.cs
- CodeEventReferenceExpression.cs
- MenuScrollingVisibilityConverter.cs
- ValueChangedEventManager.cs
- DataColumnCollection.cs
- HandledEventArgs.cs
- AudioException.cs
- XamlStyleSerializer.cs
- SerialStream.cs
- DigestComparer.cs
- DeviceContext.cs
- TextParagraphCache.cs
- CollectionView.cs
- PathFigure.cs
- DataStorage.cs
- SoapSchemaImporter.cs
- EditCommandColumn.cs
- Graph.cs
- MetadataSource.cs
- Baml2006SchemaContext.cs
- RectangleHotSpot.cs
- RootBrowserWindow.cs
- DataControlLinkButton.cs
- ColorAnimationBase.cs
- ProofTokenCryptoHandle.cs
- SqlStatistics.cs
- DebugView.cs
- QueryContext.cs
- StorageAssociationTypeMapping.cs
- IsolatedStorageFilePermission.cs
- XsltSettings.cs
- StringStorage.cs
- TdsParserStaticMethods.cs
- XmlSchemaAny.cs
- SiteMapPath.cs
- DataKey.cs
- RangeContentEnumerator.cs
- DataBindingHandlerAttribute.cs
- HwndTarget.cs
- XmlWriter.cs
- BitmapScalingModeValidation.cs
- SqlConnectionPoolGroupProviderInfo.cs
- MarkupObject.cs
- KnownColorTable.cs
- TemplateInstanceAttribute.cs
- ForeignConstraint.cs
- Semaphore.cs
- MimeBasePart.cs
- _DisconnectOverlappedAsyncResult.cs