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
- ObservableCollection.cs
- GroupBoxAutomationPeer.cs
- TextModifierScope.cs
- SecurityDescriptor.cs
- QueryResult.cs
- EdmProperty.cs
- CLSCompliantAttribute.cs
- Panel.cs
- WriteableOnDemandStream.cs
- DataFieldEditor.cs
- ReadContentAsBinaryHelper.cs
- HandleCollector.cs
- MasterPageParser.cs
- ListControl.cs
- Point3DAnimationBase.cs
- QilUnary.cs
- SectionXmlInfo.cs
- pingexception.cs
- RectValueSerializer.cs
- CustomAttributeFormatException.cs
- ListBoxItemWrapperAutomationPeer.cs
- SoapReflector.cs
- ButtonStandardAdapter.cs
- QilExpression.cs
- TableCell.cs
- HtmlInputRadioButton.cs
- HtmlInputReset.cs
- DataGridView.cs
- EventBuilder.cs
- BuildProvider.cs
- SafeCryptoHandles.cs
- XPathConvert.cs
- LineGeometry.cs
- ListViewUpdatedEventArgs.cs
- TextBox.cs
- StrokeDescriptor.cs
- Compiler.cs
- TrustManagerPromptUI.cs
- BroadcastEventHelper.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- XmlWellformedWriter.cs
- Page.cs
- XPathNodeHelper.cs
- NeutralResourcesLanguageAttribute.cs
- XmlUtilWriter.cs
- ManagementObjectCollection.cs
- FormatterServices.cs
- WebPageTraceListener.cs
- SafeNativeMethods.cs
- ChooseAction.cs
- NameTable.cs
- ScriptModule.cs
- DesigntimeLicenseContext.cs
- AlternateView.cs
- TextRangeAdaptor.cs
- XmlDownloadManager.cs
- NotFiniteNumberException.cs
- TransactionManager.cs
- MimeAnyImporter.cs
- ByteRangeDownloader.cs
- ItemsPanelTemplate.cs
- ExpressionBindings.cs
- UniqueIdentifierService.cs
- PostBackTrigger.cs
- ListenUriMode.cs
- Scalars.cs
- _AcceptOverlappedAsyncResult.cs
- SchemaHelper.cs
- BaseAutoFormat.cs
- CodeThrowExceptionStatement.cs
- RawStylusInputCustomData.cs
- GeneratedContractType.cs
- TaskCanceledException.cs
- ComboBoxRenderer.cs
- TreeNodeEventArgs.cs
- TcpProcessProtocolHandler.cs
- ParseNumbers.cs
- HttpCapabilitiesBase.cs
- NegotiationTokenAuthenticator.cs
- TableDetailsCollection.cs
- AncillaryOps.cs
- SpellerInterop.cs
- ResourceDefaultValueAttribute.cs
- RecommendedAsConfigurableAttribute.cs
- GlobalizationAssembly.cs
- WebResourceAttribute.cs
- _HeaderInfoTable.cs
- GridViewRowEventArgs.cs
- WebConfigurationHostFileChange.cs
- CombinedGeometry.cs
- ClosableStream.cs
- ObjectFullSpanRewriter.cs
- TextEditorParagraphs.cs
- SecureEnvironment.cs
- RubberbandSelector.cs
- InputBinder.cs
- Char.cs
- ProfileParameter.cs
- XNameConverter.cs
- WeakEventTable.cs