Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ValidationEventArgs.cs
- PackagePart.cs
- DesignerAttribute.cs
- TextCollapsingProperties.cs
- FieldTemplateFactory.cs
- CqlWriter.cs
- HtmlInputFile.cs
- TreeWalker.cs
- SkinBuilder.cs
- Rights.cs
- WindowsFormsEditorServiceHelper.cs
- GeneralTransform3DGroup.cs
- XmlDataSourceNodeDescriptor.cs
- LinkedResourceCollection.cs
- CachedBitmap.cs
- X509Chain.cs
- TemplatedMailWebEventProvider.cs
- SelectionListComponentEditor.cs
- CacheEntry.cs
- OpCopier.cs
- ExceptionDetail.cs
- RegexWriter.cs
- Semaphore.cs
- OleDbCommandBuilder.cs
- OpenFileDialog.cs
- RegexBoyerMoore.cs
- SQlBooleanStorage.cs
- ObjectViewListener.cs
- PersonalizationStateInfo.cs
- compensatingcollection.cs
- exports.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- PropertyManager.cs
- ServiceManager.cs
- NativeStructs.cs
- WindowsFormsSynchronizationContext.cs
- MonitoringDescriptionAttribute.cs
- MemoryFailPoint.cs
- HtmlToClrEventProxy.cs
- ControlPropertyNameConverter.cs
- ByteKeyFrameCollection.cs
- ByteKeyFrameCollection.cs
- ResourceContainer.cs
- TableItemStyle.cs
- SizeConverter.cs
- ZipIOLocalFileDataDescriptor.cs
- SelectionUIHandler.cs
- LookupBindingPropertiesAttribute.cs
- basevalidator.cs
- HttpRuntime.cs
- DataListComponentEditor.cs
- MachineSettingsSection.cs
- RunInstallerAttribute.cs
- HeaderedItemsControl.cs
- Brush.cs
- FrugalMap.cs
- BrowserCapabilitiesCompiler.cs
- ParseElement.cs
- RadioButton.cs
- XmlTextEncoder.cs
- SoapIgnoreAttribute.cs
- StrongNameUtility.cs
- AppDomainUnloadedException.cs
- RegexMatch.cs
- DrawingContextWalker.cs
- RequiredAttributeAttribute.cs
- TextContainerChangeEventArgs.cs
- DataGridCaption.cs
- Line.cs
- EventSinkHelperWriter.cs
- PrintSystemException.cs
- Normalization.cs
- CTreeGenerator.cs
- HtmlInputCheckBox.cs
- ReadOnlyDictionary.cs
- ComboBoxItem.cs
- GAC.cs
- CustomAttributeFormatException.cs
- OverlappedAsyncResult.cs
- BitmapSource.cs
- SafeSystemMetrics.cs
- CodeTypeReferenceExpression.cs
- RemoteWebConfigurationHost.cs
- PathParser.cs
- SQLBinary.cs
- clipboard.cs
- CssTextWriter.cs
- TagMapInfo.cs
- AuthenticationConfig.cs
- DesignSurfaceCollection.cs
- WebPartZone.cs
- GridViewItemAutomationPeer.cs
- Win32.cs
- ImageField.cs
- DesignerOptions.cs
- IndependentAnimationStorage.cs
- LingerOption.cs
- AddInIpcChannel.cs
- NGCSerializer.cs
- WebHttpDispatchOperationSelectorData.cs