Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- Compress.cs
- DrawingVisualDrawingContext.cs
- SrgsOneOf.cs
- _AuthenticationState.cs
- ContainerParagraph.cs
- Debugger.cs
- UrlParameterReader.cs
- Canvas.cs
- AutomationElementCollection.cs
- OracleConnection.cs
- DataGridViewTextBoxCell.cs
- NavigatingCancelEventArgs.cs
- TypeConverterAttribute.cs
- XmlSchemaInfo.cs
- DataGridViewCellParsingEventArgs.cs
- TraceFilter.cs
- MediaTimeline.cs
- DoubleLinkList.cs
- designeractionlistschangedeventargs.cs
- RegisteredScript.cs
- TextEditorCopyPaste.cs
- ResourceSet.cs
- BitmapMetadata.cs
- QueryResponse.cs
- BamlLocalizabilityResolver.cs
- WizardPanel.cs
- XmlQueryContext.cs
- TextDecoration.cs
- InvalidOperationException.cs
- CachingHintValidation.cs
- ClaimTypes.cs
- WebBrowser.cs
- MergablePropertyAttribute.cs
- ResourcesGenerator.cs
- StaticFileHandler.cs
- FunctionImportElement.cs
- X509CertificateInitiatorServiceCredential.cs
- DataGridColumnCollectionEditor.cs
- HtmlInputFile.cs
- OptionUsage.cs
- DataViewListener.cs
- GorillaCodec.cs
- LinkedDataMemberFieldEditor.cs
- SortedList.cs
- WebPartConnectionsCancelVerb.cs
- HTTPNotFoundHandler.cs
- AutomationIdentifier.cs
- DetailsViewPagerRow.cs
- AppDomain.cs
- EventDescriptorCollection.cs
- RoutedUICommand.cs
- WebPartConnectionsConnectVerb.cs
- WindowsImpersonationContext.cs
- CopyOfAction.cs
- AttachedPropertyInfo.cs
- FilterElement.cs
- DataColumnPropertyDescriptor.cs
- ChtmlTextWriter.cs
- Sequence.cs
- KerberosSecurityTokenParameters.cs
- SimpleWorkerRequest.cs
- Hashtable.cs
- DataGridViewCellCollection.cs
- SimpleType.cs
- ViewBase.cs
- Floater.cs
- ToolBarDesigner.cs
- Axis.cs
- DbDataRecord.cs
- ApplicationGesture.cs
- RegistryConfigurationProvider.cs
- IntPtr.cs
- ServiceOperationParameter.cs
- LinkButton.cs
- __Error.cs
- ResolveInfo.cs
- GridItemCollection.cs
- TaskExceptionHolder.cs
- ChannelReliableSession.cs
- ScrollItemPattern.cs
- MultipartContentParser.cs
- SettingsBindableAttribute.cs
- DocobjHost.cs
- HtmlTitle.cs
- RootBuilder.cs
- RefType.cs
- FontDriver.cs
- shaperfactoryquerycacheentry.cs
- KeyPressEvent.cs
- FixedSOMTableRow.cs
- TextContainerHelper.cs
- DesignConnectionCollection.cs
- MenuBase.cs
- ToolStripActionList.cs
- SqlConnectionString.cs
- Encoder.cs
- CommentEmitter.cs
- ClientOptions.cs
- StoryFragments.cs
- ResourceKey.cs