Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Validation / KeyConstraint.cs / 1305376 / KeyConstraint.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Common.Utils; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace System.Data.Mapping.ViewGeneration.Validation { // Class representing a key constraint for particular cellrelation internal class KeyConstraint: InternalBase where TCellRelation : CellRelation { #region Constructor // Constructs a key constraint for the given relation and keyslots // with comparer being the comparison operator for comparing various // keyslots in Implies, etc internal KeyConstraint(TCellRelation relation, IEnumerable keySlots, IEqualityComparer comparer) { m_relation = relation; m_keySlots = new Set (keySlots, comparer).MakeReadOnly(); Debug.Assert(m_keySlots.Count > 0, "Key constraint being created without any keyslots?"); } #endregion #region Fields private TCellRelation m_relation; private Set m_keySlots; #endregion #region Properties protected TCellRelation CellRelation { get { return m_relation; } } protected Set KeySlots { get { return m_keySlots; } } #endregion #region Methods internal override void ToCompactString(StringBuilder builder) { StringUtil.FormatStringBuilder(builder, "Key (V{0}) - ", m_relation.CellNumber); StringUtil.ToSeparatedStringSorted(builder, KeySlots, ", "); // The slots contain the name of the relation: So we skip // printing the CellRelation } #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
- HorizontalAlignConverter.cs
- WorkflowOwnerAsyncResult.cs
- _StreamFramer.cs
- XmlWrappingReader.cs
- Effect.cs
- XmlNodeReader.cs
- ImageFormatConverter.cs
- ContextBase.cs
- Int32Converter.cs
- TagPrefixInfo.cs
- PerformanceCounterPermission.cs
- SiteMapDataSourceView.cs
- CellPartitioner.cs
- DbParameterCollectionHelper.cs
- ConcatQueryOperator.cs
- RolePrincipal.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ResourceSet.cs
- XamlStyleSerializer.cs
- BasicViewGenerator.cs
- BitmapEffectInput.cs
- SelectionPattern.cs
- PerformanceCounterPermission.cs
- ContentWrapperAttribute.cs
- PeerObject.cs
- PeerNameRecord.cs
- WorkflowInstance.cs
- ZipIOCentralDirectoryBlock.cs
- MenuAutoFormat.cs
- Compiler.cs
- DataTableCollection.cs
- EllipseGeometry.cs
- URL.cs
- SurrogateEncoder.cs
- SettingsAttributeDictionary.cs
- GlyphsSerializer.cs
- TextContainerHelper.cs
- EnumConverter.cs
- CacheSection.cs
- SamlAuthorizationDecisionClaimResource.cs
- DelayedRegex.cs
- InstanceNameConverter.cs
- SymmetricAlgorithm.cs
- UserPreferenceChangedEventArgs.cs
- DataSourceXmlTextReader.cs
- LinkClickEvent.cs
- ColorTranslator.cs
- HtmlInputRadioButton.cs
- PageOutputQuality.cs
- StringFunctions.cs
- DataServiceRequest.cs
- TokenBasedSetEnumerator.cs
- CompositeCollection.cs
- SqlMethodAttribute.cs
- InsufficientMemoryException.cs
- DateTimeStorage.cs
- ClrPerspective.cs
- SpeechRecognizer.cs
- SafeArrayRankMismatchException.cs
- AuthorizationPolicyTypeElementCollection.cs
- GenericPrincipal.cs
- TemplateXamlTreeBuilder.cs
- ListViewPagedDataSource.cs
- MetadataHelper.cs
- RbTree.cs
- GrabHandleGlyph.cs
- ToolStripComboBox.cs
- Freezable.cs
- PngBitmapEncoder.cs
- Base64Encoder.cs
- errorpatternmatcher.cs
- VideoDrawing.cs
- LinkLabel.cs
- EntityContainerEmitter.cs
- ExpanderAutomationPeer.cs
- HtmlListAdapter.cs
- ViewGenResults.cs
- ConstrainedGroup.cs
- InvokeHandlers.cs
- ObjectListCommand.cs
- ContextMenuStrip.cs
- ReadWriteObjectLock.cs
- Parser.cs
- PathBox.cs
- HybridDictionary.cs
- Pipe.cs
- ElementHostPropertyMap.cs
- StateBag.cs
- RelationshipNavigation.cs
- DetectEofStream.cs
- StreamingContext.cs
- QilSortKey.cs
- EmptyEnumerator.cs
- TextBoxBase.cs
- TargetControlTypeAttribute.cs
- IndicCharClassifier.cs
- RequestUriProcessor.cs
- XmlElementList.cs
- Avt.cs
- PathNode.cs