Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Validation / KeyConstraint.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GenericsInstances.cs
- AxHost.cs
- InfoCardKeyedHashAlgorithm.cs
- Dynamic.cs
- EntryPointNotFoundException.cs
- SpeechSeg.cs
- MulticastIPAddressInformationCollection.cs
- TextParagraph.cs
- HighContrastHelper.cs
- Matrix.cs
- Splitter.cs
- CacheMemory.cs
- ConfigurationLocation.cs
- BigInt.cs
- DirectionalLight.cs
- DataObjectSettingDataEventArgs.cs
- RequestQueryProcessor.cs
- UnsafeNativeMethods.cs
- Geometry.cs
- Freezable.cs
- MethodBody.cs
- ReachSerializationCacheItems.cs
- EventLog.cs
- XmlAttributeCollection.cs
- InputScope.cs
- ChangePassword.cs
- NumberSubstitution.cs
- RandomNumberGenerator.cs
- Parser.cs
- WebBrowserPermission.cs
- UshortList2.cs
- ConfigurationValidatorBase.cs
- MarkupProperty.cs
- ToolStripOverflowButton.cs
- HostingEnvironmentException.cs
- MissingFieldException.cs
- TypeGeneratedEventArgs.cs
- ByteBufferPool.cs
- TextRunCacheImp.cs
- HMACSHA512.cs
- COM2EnumConverter.cs
- EtwTrace.cs
- ValueTypePropertyReference.cs
- ListControlConvertEventArgs.cs
- ReaderContextStackData.cs
- CategoryAttribute.cs
- XmlSchemaComplexType.cs
- DiscoveryDocumentReference.cs
- WindowsListViewGroup.cs
- WebPartEditorApplyVerb.cs
- Material.cs
- ServiceHostingEnvironmentSection.cs
- PackagingUtilities.cs
- BamlLocalizableResource.cs
- StatementContext.cs
- PhysicalAddress.cs
- compensatingcollection.cs
- DefaultObjectMappingItemCollection.cs
- BitmapFrame.cs
- CollectionView.cs
- WebEvents.cs
- SerializationTrace.cs
- HMACSHA1.cs
- HostingPreferredMapPath.cs
- EventLogPermissionEntry.cs
- FontDifferentiator.cs
- CheckBox.cs
- TimeSpanStorage.cs
- SchemaAttDef.cs
- XmlTextReaderImplHelpers.cs
- ExpandCollapseProviderWrapper.cs
- ImportDesigner.xaml.cs
- HtmlGenericControl.cs
- URIFormatException.cs
- ListenerElementsCollection.cs
- DictionarySurrogate.cs
- PagerStyle.cs
- ExpressionContext.cs
- IDictionary.cs
- SchemaAttDef.cs
- XmlSchemaProviderAttribute.cs
- Point4DValueSerializer.cs
- CalendarDataBindingHandler.cs
- QilTargetType.cs
- ResXBuildProvider.cs
- SiteMapSection.cs
- SecurityPolicySection.cs
- FileStream.cs
- VariantWrapper.cs
- SqlBulkCopyColumnMappingCollection.cs
- NominalTypeEliminator.cs
- XPathScanner.cs
- ColorAnimation.cs
- XmlSchemaAnnotated.cs
- Mapping.cs
- Bezier.cs
- Popup.cs
- SurrogateSelector.cs
- DataChangedEventManager.cs
- CurrentTimeZone.cs