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
- cookie.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- XmlSerializer.cs
- CachedTypeface.cs
- ExpressionList.cs
- TextDecorationCollection.cs
- ResXBuildProvider.cs
- DBDataPermission.cs
- panel.cs
- NotImplementedException.cs
- Cell.cs
- SystemIPInterfaceStatistics.cs
- ISCIIEncoding.cs
- GreenMethods.cs
- Parser.cs
- HttpCapabilitiesBase.cs
- TraceUtility.cs
- SqlNotificationEventArgs.cs
- UInt32Converter.cs
- PopupRoot.cs
- FixedFindEngine.cs
- GroupJoinQueryOperator.cs
- XmlSigningNodeWriter.cs
- CodeGenerator.cs
- InputMethod.cs
- RecipientInfo.cs
- SoapIgnoreAttribute.cs
- LifetimeServices.cs
- PrintPreviewDialog.cs
- ObjectReaderCompiler.cs
- PropertyEmitter.cs
- ManualWorkflowSchedulerService.cs
- NavigationExpr.cs
- SiteMapDataSource.cs
- Environment.cs
- ContextQuery.cs
- GeneralTransform.cs
- SafeLibraryHandle.cs
- BeginEvent.cs
- ExtenderProvidedPropertyAttribute.cs
- Calendar.cs
- FilterElement.cs
- FloaterParaClient.cs
- GenericTypeParameterBuilder.cs
- XmlReaderDelegator.cs
- UnsafeCollabNativeMethods.cs
- TypeRestriction.cs
- UrlEncodedParameterWriter.cs
- safelink.cs
- ActivationArguments.cs
- ProfileProvider.cs
- ButtonField.cs
- StringValidator.cs
- CommandExpr.cs
- WorkflowElementDialogWindow.xaml.cs
- Certificate.cs
- DataSource.cs
- FolderBrowserDialog.cs
- UrlEncodedParameterWriter.cs
- SequentialUshortCollection.cs
- SqlCommandBuilder.cs
- ObjectHelper.cs
- updateconfighost.cs
- DupHandleConnectionReader.cs
- HtmlTableRowCollection.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ReadWriteObjectLock.cs
- WriterOutput.cs
- LinearKeyFrames.cs
- MsdtcClusterUtils.cs
- PixelShader.cs
- FactoryRecord.cs
- ResourceDisplayNameAttribute.cs
- DemultiplexingClientMessageFormatter.cs
- TypeNameConverter.cs
- TypeKeyValue.cs
- GetWinFXPath.cs
- DataBoundControlHelper.cs
- CheckBoxDesigner.cs
- SqlUDTStorage.cs
- EditCommandColumn.cs
- SecurityCapabilities.cs
- DataGridViewRowConverter.cs
- UIElementCollection.cs
- ReleaseInstanceMode.cs
- DropShadowEffect.cs
- _KerberosClient.cs
- PrintingPermission.cs
- SqlDesignerDataSourceView.cs
- RegexMatch.cs
- ToolStripStatusLabel.cs
- WmlImageAdapter.cs
- HttpValueCollection.cs
- InvalidOperationException.cs
- DocumentViewerBaseAutomationPeer.cs
- CodeParameterDeclarationExpression.cs
- DataGridViewCellStyleChangedEventArgs.cs
- NamespaceEmitter.cs
- ZipFileInfoCollection.cs
- BufferedGraphicsManager.cs