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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MergablePropertyAttribute.cs
- XamlVector3DCollectionSerializer.cs
- XmlSerializationGeneratedCode.cs
- DataGridViewMethods.cs
- TextAutomationPeer.cs
- MouseWheelEventArgs.cs
- AlignmentYValidation.cs
- MenuItemStyleCollection.cs
- Brush.cs
- ValidationEventArgs.cs
- ISessionStateStore.cs
- ColumnWidthChangingEvent.cs
- SecurityUtils.cs
- ProfileParameter.cs
- StandardToolWindows.cs
- MessageSecurityTokenVersion.cs
- PenLineCapValidation.cs
- SoapRpcServiceAttribute.cs
- Vector3DCollectionValueSerializer.cs
- CacheManager.cs
- HttpRuntime.cs
- StyleHelper.cs
- HttpContextWrapper.cs
- _Connection.cs
- FontDifferentiator.cs
- TimeStampChecker.cs
- OdbcConnectionString.cs
- RunInstallerAttribute.cs
- ExtensionElementCollection.cs
- TemplateControlParser.cs
- Transform.cs
- SrgsDocumentParser.cs
- SafeFileMapViewHandle.cs
- WindowPattern.cs
- DataGridViewHeaderCell.cs
- PackageRelationshipCollection.cs
- Formatter.cs
- _SSPIWrapper.cs
- PasswordRecovery.cs
- ExceptionUtil.cs
- safex509handles.cs
- QilTargetType.cs
- OrderedDictionary.cs
- PartialClassGenerationTask.cs
- SafeCoTaskMem.cs
- SqlDataSourceStatusEventArgs.cs
- COSERVERINFO.cs
- RemoveStoryboard.cs
- HebrewNumber.cs
- _Semaphore.cs
- DiscoveryMessageProperty.cs
- MenuScrollingVisibilityConverter.cs
- ControlCachePolicy.cs
- IOException.cs
- WebBrowserContainer.cs
- Parameter.cs
- TdsParameterSetter.cs
- WinFormsSecurity.cs
- Composition.cs
- RegexWriter.cs
- BuildProvider.cs
- MediaContext.cs
- ToolStripItem.cs
- IdentityModelStringsVersion1.cs
- ReverseQueryOperator.cs
- IsolatedStorageException.cs
- DataGridViewCellStyleConverter.cs
- QuaternionAnimation.cs
- DocumentViewerBaseAutomationPeer.cs
- TypeConverterHelper.cs
- OlePropertyStructs.cs
- TrackingDataItemValue.cs
- PageOutputColor.cs
- DoubleAnimationBase.cs
- OdbcRowUpdatingEvent.cs
- ValidatorCompatibilityHelper.cs
- SelectingProviderEventArgs.cs
- DynamicResourceExtension.cs
- BaseCodeDomTreeGenerator.cs
- CustomErrorsSection.cs
- Rotation3D.cs
- WebPartDisplayModeCollection.cs
- DataColumnPropertyDescriptor.cs
- DictionarySectionHandler.cs
- DataTableMappingCollection.cs
- XPathException.cs
- RegexBoyerMoore.cs
- PeerNameRecord.cs
- InputDevice.cs
- ErrorLog.cs
- FloaterParagraph.cs
- LicenseManager.cs
- SplayTreeNode.cs
- ServiceDefaults.cs
- MsmqOutputMessage.cs
- BaseDataList.cs
- ToolStripRenderEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- Focus.cs
- HttpCacheVaryByContentEncodings.cs