Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------- // // 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
- BoolLiteral.cs
- MenuRendererStandards.cs
- DSASignatureDeformatter.cs
- Variable.cs
- PropertyGeneratedEventArgs.cs
- ObjectFullSpanRewriter.cs
- CompressEmulationStream.cs
- RIPEMD160.cs
- ReflectionPermission.cs
- ServiceBehaviorElement.cs
- CollectionViewGroupRoot.cs
- EffectiveValueEntry.cs
- DomNameTable.cs
- ItemCheckedEvent.cs
- TypeConverterValueSerializer.cs
- EntityCodeGenerator.cs
- AspCompat.cs
- PageParserFilter.cs
- sitestring.cs
- _NestedMultipleAsyncResult.cs
- DesignerDataStoredProcedure.cs
- webproxy.cs
- PrivilegedConfigurationManager.cs
- InkCanvas.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- StorageComplexPropertyMapping.cs
- FixedFlowMap.cs
- ConfigXmlSignificantWhitespace.cs
- CapacityStreamGeometryContext.cs
- OleDbTransaction.cs
- TextPenaltyModule.cs
- LoginUtil.cs
- BindingExpressionUncommonField.cs
- ProcessHostServerConfig.cs
- HttpModuleActionCollection.cs
- DataAccessor.cs
- RectAnimationUsingKeyFrames.cs
- SerializationInfoEnumerator.cs
- SizeChangedInfo.cs
- IsolatedStorageException.cs
- OpenTypeCommon.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- WebHttpSecurityElement.cs
- SimpleTextLine.cs
- BinaryCommonClasses.cs
- XpsFilter.cs
- XmlEncApr2001.cs
- ExceptionUtil.cs
- _emptywebproxy.cs
- DataProtectionSecurityStateEncoder.cs
- XmlCharacterData.cs
- IisTraceWebEventProvider.cs
- ProvideValueServiceProvider.cs
- DbgUtil.cs
- SHA256CryptoServiceProvider.cs
- unitconverter.cs
- WorkflowLayouts.cs
- Transform3DGroup.cs
- FunctionMappingTranslator.cs
- HashUtility.cs
- DoubleSumAggregationOperator.cs
- CheckBoxList.cs
- DropAnimation.xaml.cs
- UpdateManifestForBrowserApplication.cs
- Normalization.cs
- WebConfigurationManager.cs
- Figure.cs
- SizeConverter.cs
- HttpDictionary.cs
- XhtmlConformanceSection.cs
- TemplatePropertyEntry.cs
- FlowLayoutSettings.cs
- LinqDataSourceValidationException.cs
- SerializationIncompleteException.cs
- ExpressionBuilder.cs
- StylusEventArgs.cs
- SystemIPInterfaceProperties.cs
- LinkButton.cs
- FilterEventArgs.cs
- HtmlInputFile.cs
- TextBreakpoint.cs
- ValidationUtility.cs
- CqlQuery.cs
- UndirectedGraph.cs
- FixedSOMTableRow.cs
- TouchDevice.cs
- Matrix3DStack.cs
- ToolTip.cs
- XMLDiffLoader.cs
- OperationPerformanceCounters.cs
- XmlSchemaAll.cs
- HtmlTableRow.cs
- SqlComparer.cs
- GeometryGroup.cs
- RegexFCD.cs
- ProfessionalColors.cs
- DbCommandTree.cs
- DummyDataSource.cs
- FileDialog_Vista.cs
- ObjectListField.cs