Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Validation / KeyConstraint.cs / 1 / 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. //---------------------------------------------------------------------- // // 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
- LocalizableResourceBuilder.cs
- BypassElement.cs
- SqlTransaction.cs
- VisualTransition.cs
- SweepDirectionValidation.cs
- AnnotationElement.cs
- DefaultValueAttribute.cs
- BookmarkInfo.cs
- ZipIOExtraFieldZip64Element.cs
- FixedSOMPageElement.cs
- SendKeys.cs
- DbMetaDataColumnNames.cs
- EditorBrowsableAttribute.cs
- _PooledStream.cs
- InteropBitmapSource.cs
- DataBoundControl.cs
- AndMessageFilter.cs
- TogglePatternIdentifiers.cs
- Flowchart.cs
- PageRequestManager.cs
- SettingsContext.cs
- TemplateBuilder.cs
- Binding.cs
- ObjectDataSourceChooseTypePanel.cs
- X509Chain.cs
- MarkupCompilePass2.cs
- ExpressionsCollectionEditor.cs
- ConfigurationSection.cs
- RenameRuleObjectDialog.cs
- safex509handles.cs
- ServiceKnownTypeAttribute.cs
- Range.cs
- ClientScriptManagerWrapper.cs
- _BufferOffsetSize.cs
- AppDomainAttributes.cs
- COM2TypeInfoProcessor.cs
- NotImplementedException.cs
- SystemSounds.cs
- safex509handles.cs
- ErrorTableItemStyle.cs
- IsolatedStorageException.cs
- PageHandlerFactory.cs
- panel.cs
- MenuCommand.cs
- ListViewTableRow.cs
- OutputCacheModule.cs
- SamlEvidence.cs
- SqlUDTStorage.cs
- DesigntimeLicenseContextSerializer.cs
- DynamicField.cs
- FileNameEditor.cs
- HostedImpersonationContext.cs
- ImageSourceConverter.cs
- PagesSection.cs
- BulletDecorator.cs
- SmiSettersStream.cs
- StretchValidation.cs
- TableCellAutomationPeer.cs
- ImageSourceValueSerializer.cs
- SourceElementsCollection.cs
- RadioButtonStandardAdapter.cs
- TemplateColumn.cs
- DoubleLinkListEnumerator.cs
- TableDetailsCollection.cs
- ReferenceEqualityComparer.cs
- SqlDataSourceSummaryPanel.cs
- Margins.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SafeLocalAllocation.cs
- SchemaImporterExtension.cs
- validationstate.cs
- SemaphoreFullException.cs
- HiddenFieldPageStatePersister.cs
- ProbeMatchesApril2005.cs
- TypeGeneratedEventArgs.cs
- ListViewEditEventArgs.cs
- MemberInfoSerializationHolder.cs
- SlipBehavior.cs
- CheckedPointers.cs
- XPathNodeList.cs
- NativeCompoundFileAPIs.cs
- VerifyHashRequest.cs
- Simplifier.cs
- ImagingCache.cs
- SafeRightsManagementSessionHandle.cs
- ToolStripDropDownClosingEventArgs.cs
- LineSegment.cs
- DESCryptoServiceProvider.cs
- DeviceContext2.cs
- TouchPoint.cs
- StringArrayConverter.cs
- X509Extension.cs
- Pens.cs
- PathFigureCollection.cs
- ChannelSinkStacks.cs
- CalculatedColumn.cs
- DrawingGroupDrawingContext.cs
- XmlSchemaSequence.cs
- ToolStripRendererSwitcher.cs
- ServiceOperationParameter.cs