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
- XmlTypeMapping.cs
- BamlLocalizableResourceKey.cs
- Convert.cs
- WebServicesSection.cs
- ForEachAction.cs
- SecurityException.cs
- TransactionManager.cs
- UntypedNullExpression.cs
- Assembly.cs
- HtmlInputFile.cs
- ExpressionBuilder.cs
- SqlTriggerContext.cs
- mansign.cs
- MgmtConfigurationRecord.cs
- XPathNavigator.cs
- LongValidator.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- FileDialogCustomPlaces.cs
- TableCellCollection.cs
- PointLightBase.cs
- GiveFeedbackEventArgs.cs
- DynamicDocumentPaginator.cs
- XmlValidatingReaderImpl.cs
- XmlSerializerAssemblyAttribute.cs
- Utils.cs
- MonthCalendar.cs
- CopyAction.cs
- WindowsButton.cs
- ProfessionalColors.cs
- CompilerCollection.cs
- RawKeyboardInputReport.cs
- XamlTypeMapper.cs
- Crc32.cs
- DataGridTextBox.cs
- RuleConditionDialog.cs
- ExternalException.cs
- EntityDataSourceWrapper.cs
- BindingNavigator.cs
- XmlQualifiedName.cs
- AssemblyAttributesGoHere.cs
- AuthenticationService.cs
- PerformanceCounterManager.cs
- PrimitiveDataContract.cs
- SessionParameter.cs
- BasePattern.cs
- FtpWebRequest.cs
- VariableQuery.cs
- SQLCharsStorage.cs
- ExpressionNormalizer.cs
- MailSettingsSection.cs
- ServiceInfoCollection.cs
- CommonGetThemePartSize.cs
- ConfigurationSection.cs
- MLangCodePageEncoding.cs
- PropertyChangedEventManager.cs
- SchemaElement.cs
- NameScopePropertyAttribute.cs
- FileUtil.cs
- DataControlPagerLinkButton.cs
- AppDomainInstanceProvider.cs
- DynamicResourceExtensionConverter.cs
- TypefaceMetricsCache.cs
- DesignerCategoryAttribute.cs
- PublisherMembershipCondition.cs
- MultiAsyncResult.cs
- GeneralTransform3DTo2DTo3D.cs
- SpecialFolderEnumConverter.cs
- SqlServer2KCompatibilityAnnotation.cs
- MatrixTransform.cs
- KeyEventArgs.cs
- PriorityBinding.cs
- MatchAttribute.cs
- DependencyPropertyHelper.cs
- ImageMetadata.cs
- WebPermission.cs
- CaseInsensitiveHashCodeProvider.cs
- DataGridViewRowsRemovedEventArgs.cs
- dataprotectionpermission.cs
- ExtentKey.cs
- ParseHttpDate.cs
- TypeToken.cs
- SortFieldComparer.cs
- PassportIdentity.cs
- SqlRowUpdatingEvent.cs
- XmlComplianceUtil.cs
- EntityWithChangeTrackerStrategy.cs
- ByteStream.cs
- ScriptControl.cs
- MessageBox.cs
- XmlQueryStaticData.cs
- ListViewItem.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SortExpressionBuilder.cs
- DataGridAddNewRow.cs
- TcpTransportManager.cs
- ToolStrip.cs
- versioninfo.cs
- XmlStringTable.cs
- TextServicesProperty.cs
- RelationshipEntry.cs