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
- LayoutManager.cs
- RightNameExpirationInfoPair.cs
- ReliableChannelBinder.cs
- EllipseGeometry.cs
- ToolboxItemCollection.cs
- Form.cs
- XmlBinaryReader.cs
- WebBrowserNavigatingEventHandler.cs
- MetadataArtifactLoaderCompositeResource.cs
- WebBaseEventKeyComparer.cs
- MappingSource.cs
- SQLGuid.cs
- SystemColors.cs
- ScaleTransform3D.cs
- Int64Converter.cs
- latinshape.cs
- InternalResources.cs
- XmlEventCache.cs
- UserNameSecurityTokenParameters.cs
- CalendarData.cs
- DispatcherExceptionEventArgs.cs
- SQLInt64.cs
- EnumerableValidator.cs
- DeriveBytes.cs
- CharAnimationBase.cs
- PropertyPathConverter.cs
- XamlSerializationHelper.cs
- ThreadSafeList.cs
- RenderTargetBitmap.cs
- DrawItemEvent.cs
- XmlSchemaInferenceException.cs
- WinCategoryAttribute.cs
- EventLogConfiguration.cs
- ExtendedProperty.cs
- BuildProvider.cs
- TextEndOfParagraph.cs
- DbQueryCommandTree.cs
- DesignerView.Commands.cs
- TimeSpan.cs
- WebBrowserDocumentCompletedEventHandler.cs
- HttpModuleCollection.cs
- OdbcError.cs
- ReflectEventDescriptor.cs
- EditorPartCollection.cs
- SecurityChannelFactory.cs
- ellipse.cs
- ListItemCollection.cs
- WhitespaceReader.cs
- EntitySqlException.cs
- ChildTable.cs
- MatrixConverter.cs
- XmlQualifiedNameTest.cs
- WebPartEditVerb.cs
- HwndHostAutomationPeer.cs
- AuthenticationModeHelper.cs
- SafeLocalMemHandle.cs
- NotifyParentPropertyAttribute.cs
- NameValueConfigurationElement.cs
- PostBackOptions.cs
- XsltCompileContext.cs
- WorkflowOwnerAsyncResult.cs
- RijndaelCryptoServiceProvider.cs
- ContentOperations.cs
- ObjectSpanRewriter.cs
- XmlSchemaNotation.cs
- Journaling.cs
- SizeConverter.cs
- WebServiceAttribute.cs
- PersonalizationStateQuery.cs
- MarkupProperty.cs
- PermissionRequestEvidence.cs
- HierarchicalDataTemplate.cs
- GridView.cs
- DataContractSet.cs
- RadioButton.cs
- WebPartVerb.cs
- CommonGetThemePartSize.cs
- SchemaTableColumn.cs
- StateDesignerConnector.cs
- ETagAttribute.cs
- HostingEnvironmentSection.cs
- XmlSerializerSection.cs
- WebPartPersonalization.cs
- XmlSchemaSimpleType.cs
- designeractionlistschangedeventargs.cs
- AbandonedMutexException.cs
- XmlCharCheckingReader.cs
- DbBuffer.cs
- ReferentialConstraint.cs
- DuplicateDetector.cs
- TextServicesManager.cs
- ImmComposition.cs
- PrinterResolution.cs
- UserMapPath.cs
- ResXResourceReader.cs
- Queue.cs
- DataGridView.cs
- PEFileReader.cs
- CheckBoxPopupAdapter.cs
- EpmContentSerializer.cs