Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Size3D.cs
- EdmConstants.cs
- OdbcParameter.cs
- Padding.cs
- RawUIStateInputReport.cs
- Calendar.cs
- TraceFilter.cs
- XmlProcessingInstruction.cs
- BaseWebProxyFinder.cs
- RepeaterItemEventArgs.cs
- Delegate.cs
- HttpRawResponse.cs
- PopupEventArgs.cs
- DesignerAutoFormatStyle.cs
- XsltLoader.cs
- SourceFilter.cs
- SmtpFailedRecipientException.cs
- ParseHttpDate.cs
- XsltFunctions.cs
- RegexTree.cs
- DecimalAnimation.cs
- MediaTimeline.cs
- __Filters.cs
- SafeArchiveContext.cs
- TreeBuilderBamlTranslator.cs
- Mapping.cs
- SubpageParaClient.cs
- Stream.cs
- SecurityToken.cs
- CultureSpecificCharacterBufferRange.cs
- XmlTypeAttribute.cs
- SafeNativeMethodsOther.cs
- ConfigurationElementCollection.cs
- EventLogEntryCollection.cs
- NullableDoubleMinMaxAggregationOperator.cs
- RenderData.cs
- XmlEncoding.cs
- XmlBinaryReader.cs
- InfoCardSymmetricAlgorithm.cs
- TagMapCollection.cs
- SelfIssuedAuthProofToken.cs
- PopOutPanel.cs
- XPathNodePointer.cs
- XamlSerializer.cs
- ByteStorage.cs
- safex509handles.cs
- ItemsControlAutomationPeer.cs
- CodeConstructor.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- LinqDataSourceUpdateEventArgs.cs
- WindowsFormsLinkLabel.cs
- HtmlInputFile.cs
- SecurityKeyType.cs
- ColorBlend.cs
- WebServiceData.cs
- RoleServiceManager.cs
- AdCreatedEventArgs.cs
- Root.cs
- RangeBase.cs
- PeerService.cs
- printdlgexmarshaler.cs
- SafeFileHandle.cs
- ModuleBuilder.cs
- ProxyWebPart.cs
- OutKeywords.cs
- InputLangChangeRequestEvent.cs
- WebPartCatalogAddVerb.cs
- Boolean.cs
- AsyncCompletedEventArgs.cs
- ContentAlignmentEditor.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- CatalogZone.cs
- LabelLiteral.cs
- DetailsViewInsertedEventArgs.cs
- SqlUserDefinedAggregateAttribute.cs
- AppDomainGrammarProxy.cs
- AuthStoreRoleProvider.cs
- RbTree.cs
- SqlUdtInfo.cs
- CodeBlockBuilder.cs
- DataGridViewCellPaintingEventArgs.cs
- SystemUnicastIPAddressInformation.cs
- TaiwanCalendar.cs
- SafeRightsManagementSessionHandle.cs
- SettingsPropertyNotFoundException.cs
- XmlSortKeyAccumulator.cs
- BamlLocalizer.cs
- Sql8ExpressionRewriter.cs
- SafeEventLogWriteHandle.cs
- XmlBinaryReader.cs
- SecurityTokenRequirement.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- FixUp.cs
- RoleManagerEventArgs.cs
- CodeSnippetCompileUnit.cs
- SvcMapFileSerializer.cs
- InstanceOwner.cs
- TextBox.cs
- UTF7Encoding.cs
- DynamicQueryStringParameter.cs