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
- ProtocolsConfigurationHandler.cs
- GeneralTransform2DTo3D.cs
- SiteMapDataSource.cs
- StorageFunctionMapping.cs
- DeclarativeCatalogPartDesigner.cs
- FontCacheUtil.cs
- DataTableTypeConverter.cs
- RegionData.cs
- DataGridLinkButton.cs
- HtmlInputImage.cs
- SnapshotChangeTrackingStrategy.cs
- adornercollection.cs
- PeerNameRecordCollection.cs
- panel.cs
- ApplicationServicesHostFactory.cs
- IncrementalCompileAnalyzer.cs
- _FixedSizeReader.cs
- TableTextElementCollectionInternal.cs
- CatalogPartChrome.cs
- BitmapData.cs
- UITypeEditor.cs
- TextTrailingCharacterEllipsis.cs
- ValidatedControlConverter.cs
- XmlAttributeProperties.cs
- DecoderReplacementFallback.cs
- VarInfo.cs
- IncrementalCompileAnalyzer.cs
- CacheMemory.cs
- BoolExpression.cs
- LookupBindingPropertiesAttribute.cs
- ToolStripItem.cs
- NavigationHelper.cs
- SimpleWebHandlerParser.cs
- WmlControlAdapter.cs
- AddInProcess.cs
- GridItemCollection.cs
- Int16AnimationBase.cs
- PropertyStore.cs
- BooleanAnimationUsingKeyFrames.cs
- XmlExpressionDumper.cs
- PolicyVersion.cs
- WebSysDefaultValueAttribute.cs
- SQLDateTime.cs
- SafeFreeMibTable.cs
- CodeMemberMethod.cs
- IgnoreDeviceFilterElement.cs
- NameValueConfigurationElement.cs
- SoapClientProtocol.cs
- SqlConnectionHelper.cs
- ZipIOExtraField.cs
- regiisutil.cs
- KeyEventArgs.cs
- RegexCharClass.cs
- XmlRootAttribute.cs
- CorePropertiesFilter.cs
- XamlFilter.cs
- SrgsElementFactoryCompiler.cs
- WebPartConnectVerb.cs
- DispatchWrapper.cs
- NotificationContext.cs
- ObjectView.cs
- Compiler.cs
- TableSectionStyle.cs
- ResourceCategoryAttribute.cs
- GreenMethods.cs
- PartitionResolver.cs
- BindToObject.cs
- ToolStripSettings.cs
- UTF8Encoding.cs
- IBuiltInEvidence.cs
- CircleEase.cs
- AssemblyCollection.cs
- Table.cs
- FrameworkElement.cs
- LineBreak.cs
- CodeTypeOfExpression.cs
- InvokeMethod.cs
- ServiceRoute.cs
- Dump.cs
- ClosableStream.cs
- StreamWriter.cs
- SynchronizedInputAdaptor.cs
- InvalidAsynchronousStateException.cs
- Part.cs
- _RequestCacheProtocol.cs
- TriState.cs
- AnnotationService.cs
- FileSystemInfo.cs
- WrapPanel.cs
- Bitmap.cs
- TextChangedEventArgs.cs
- InputQueueChannelAcceptor.cs
- PasswordTextContainer.cs
- XmlSerializerOperationBehavior.cs
- EditCommandColumn.cs
- TrackingParticipant.cs
- _KerberosClient.cs
- UriWriter.cs
- SpecialNameAttribute.cs
- SqlDataSourceRefreshSchemaForm.cs