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
- ReferenceCountedObject.cs
- UserValidatedEventArgs.cs
- NameSpaceExtractor.cs
- ListItemCollection.cs
- HandlerFactoryWrapper.cs
- SQLConvert.cs
- TypeUtil.cs
- ViewgenGatekeeper.cs
- CodeCastExpression.cs
- WindowsScrollBar.cs
- Pkcs7Recipient.cs
- OracleException.cs
- SqlDataSourceConfigureFilterForm.cs
- RSAOAEPKeyExchangeFormatter.cs
- RectConverter.cs
- ObjectSecurity.cs
- TreeWalkHelper.cs
- TrustLevelCollection.cs
- MulticastOption.cs
- BasicBrowserDialog.cs
- AlgoModule.cs
- FtpWebRequest.cs
- HtmlControlPersistable.cs
- EntityCommandExecutionException.cs
- WebPartDisplayModeEventArgs.cs
- TickBar.cs
- FormViewInsertedEventArgs.cs
- Label.cs
- RichTextBoxDesigner.cs
- TraceHwndHost.cs
- BackgroundWorker.cs
- DefaultAuthorizationContext.cs
- DataColumnPropertyDescriptor.cs
- InputProcessorProfiles.cs
- CalendarDateRange.cs
- DefaultMemberAttribute.cs
- DocumentPaginator.cs
- InvokeMemberBinder.cs
- HMACSHA512.cs
- CompModSwitches.cs
- SharedStatics.cs
- RegexCompiler.cs
- LinqDataSourceDisposeEventArgs.cs
- InboundActivityHelper.cs
- MultitargetUtil.cs
- PtsContext.cs
- SolidColorBrush.cs
- HasCopySemanticsAttribute.cs
- DataServiceProcessingPipelineEventArgs.cs
- IndicShape.cs
- TrayIconDesigner.cs
- FormClosingEvent.cs
- ContextStack.cs
- TypeDependencyAttribute.cs
- MexHttpBindingCollectionElement.cs
- HttpWriter.cs
- EmptyQuery.cs
- COM2FontConverter.cs
- FontInfo.cs
- RelativeSource.cs
- EnumCodeDomSerializer.cs
- PropertyChangedEventArgs.cs
- TabPanel.cs
- MessageDispatch.cs
- AssociationTypeEmitter.cs
- PermissionSet.cs
- WindowsGraphicsWrapper.cs
- HMAC.cs
- NewArray.cs
- TextSchema.cs
- TreeBuilder.cs
- DateTimeFormatInfoScanner.cs
- SiteMembershipCondition.cs
- RegisteredHiddenField.cs
- SiteOfOriginPart.cs
- StylusPointCollection.cs
- CodeMemberMethod.cs
- AxParameterData.cs
- ToolStripSystemRenderer.cs
- ObjectDataProvider.cs
- SimpleHandlerFactory.cs
- XmlNodeList.cs
- NonVisualControlAttribute.cs
- CodeDefaultValueExpression.cs
- ToolboxItem.cs
- UnsafePeerToPeerMethods.cs
- RegexGroup.cs
- InputBinding.cs
- relpropertyhelper.cs
- ISAPIRuntime.cs
- TypeNameHelper.cs
- WindowsListViewGroupHelper.cs
- UriSection.cs
- VisualProxy.cs
- DomainLiteralReader.cs
- _ContextAwareResult.cs
- followingquery.cs
- OperandQuery.cs
- BitmapCodecInfo.cs
- DispatcherProcessingDisabled.cs