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
- KeyInstance.cs
- SpeechRecognizer.cs
- MultipleViewPattern.cs
- ObjectDataSourceStatusEventArgs.cs
- TextTreeObjectNode.cs
- HtmlSelect.cs
- PropertyBuilder.cs
- DPTypeDescriptorContext.cs
- ReliableReplySessionChannel.cs
- SrgsDocumentParser.cs
- CaseCqlBlock.cs
- FormClosingEvent.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- InstanceData.cs
- InstanceKeyView.cs
- KeyboardDevice.cs
- SqlCachedBuffer.cs
- X509CertificateChain.cs
- ZoomPercentageConverter.cs
- _NetRes.cs
- XamlToRtfWriter.cs
- EventLogPermissionEntry.cs
- ApplySecurityAndSendAsyncResult.cs
- RuleAction.cs
- ItemMap.cs
- Vector3DConverter.cs
- OutOfMemoryException.cs
- SqlDataSourceStatusEventArgs.cs
- CallId.cs
- XmlReaderSettings.cs
- EventPrivateKey.cs
- BuildDependencySet.cs
- XPathAncestorIterator.cs
- RegexStringValidator.cs
- BuilderPropertyEntry.cs
- ToolStripSettings.cs
- CollectionsUtil.cs
- PriorityItem.cs
- CollectionChangeEventArgs.cs
- UnmanagedHandle.cs
- SevenBitStream.cs
- UpdateProgress.cs
- WindowsGrip.cs
- ISAPIApplicationHost.cs
- SmtpFailedRecipientsException.cs
- ParentQuery.cs
- Property.cs
- DependencyObjectProvider.cs
- CompiledXpathExpr.cs
- WebPartCatalogAddVerb.cs
- InvariantComparer.cs
- ScrollContentPresenter.cs
- StylusButtonCollection.cs
- SQLDoubleStorage.cs
- ComplexTypeEmitter.cs
- GridItemPattern.cs
- GeneralTransform.cs
- ProfileSection.cs
- CopyCodeAction.cs
- StylusPointProperties.cs
- CheckBoxFlatAdapter.cs
- RichTextBoxAutomationPeer.cs
- UnsafeNativeMethods.cs
- NativeStructs.cs
- DataSourceView.cs
- GroupLabel.cs
- sqlstateclientmanager.cs
- ChannelCacheDefaults.cs
- RadioButtonFlatAdapter.cs
- HashMembershipCondition.cs
- StreamInfo.cs
- AlternateView.cs
- Table.cs
- ListView.cs
- TextPointer.cs
- FixedTextBuilder.cs
- InternalResources.cs
- TypeSystemProvider.cs
- DBConcurrencyException.cs
- DesignerAttributeInfo.cs
- Walker.cs
- DocumentAutomationPeer.cs
- CustomErrorsSectionWrapper.cs
- SqlInternalConnectionSmi.cs
- SecurityException.cs
- WebPartTracker.cs
- ISAPIRuntime.cs
- InvokeProviderWrapper.cs
- Parser.cs
- InlineCollection.cs
- SRGSCompiler.cs
- DetailsView.cs
- SeekableMessageNavigator.cs
- InvokeMethodActivityDesigner.cs
- PhysicalOps.cs
- DesignerTransactionCloseEvent.cs
- cookiecollection.cs
- DiscoveryDocumentSearchPattern.cs
- MimeBasePart.cs
- TextBox.cs