Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Validation / SchemaConstraints.cs / 1305376 / SchemaConstraints.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Common.Utils; using System.Collections.Generic; using System.Text; namespace System.Data.Mapping.ViewGeneration.Validation { ////// A class representing a set of constraints. It uses generic parameters /// so that we can get strong typing and avoid downcasts /// internal class SchemaConstraints: InternalBase where TKeyConstraint : InternalBase { #region Constructor // effects: Creates an empty set of constraints internal SchemaConstraints() { m_keyConstraints = new List (); } #endregion #region Fields // Use different lists so we can enumerate the right kind of constraints private List m_keyConstraints; #endregion #region Properties internal IEnumerable KeyConstraints { get { return m_keyConstraints; } } #endregion #region Methods // effects: Adds a key constraint to this internal void Add(TKeyConstraint constraint) { EntityUtil.CheckArgumentNull(constraint, "constraint"); m_keyConstraints.Add(constraint); } // effects: Converts constraints to human-readable strings and adds them to builder private static void ConstraintsToBuilder (IEnumerable constraints, StringBuilder builder) where Constraint : InternalBase { foreach (Constraint constraint in constraints) { constraint.ToCompactString(builder); builder.Append(Environment.NewLine); } } internal override void ToCompactString(StringBuilder builder) { ConstraintsToBuilder(m_keyConstraints, builder); } #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
- MouseEvent.cs
- CodeArrayCreateExpression.cs
- ResourceExpression.cs
- NativeMethods.cs
- ToolStripItemCollection.cs
- HitTestResult.cs
- TargetException.cs
- ListViewTableCell.cs
- InvokeProviderWrapper.cs
- Line.cs
- HashUtility.cs
- XmlComplianceUtil.cs
- FormatVersion.cs
- TextTreeNode.cs
- UnmanagedHandle.cs
- SystemIPv4InterfaceProperties.cs
- TransactedBatchContext.cs
- DatagridviewDisplayedBandsData.cs
- FunctionMappingTranslator.cs
- GlobalizationSection.cs
- HMACMD5.cs
- ZipIORawDataFileBlock.cs
- PnrpPeerResolver.cs
- AppDomainShutdownMonitor.cs
- AccessDataSourceView.cs
- WriteableBitmap.cs
- FontStretches.cs
- ConstantExpression.cs
- SaveFileDialog.cs
- ToolStripDropDownItem.cs
- SelectionEditor.cs
- ProcessStartInfo.cs
- SqlProviderManifest.cs
- FastEncoderWindow.cs
- Int32EqualityComparer.cs
- StrokeNodeOperations.cs
- RegexCapture.cs
- LocalValueEnumerator.cs
- ControlIdConverter.cs
- WinCategoryAttribute.cs
- MediaContext.cs
- ProtocolInformationReader.cs
- TdsRecordBufferSetter.cs
- BulletDecorator.cs
- Helper.cs
- PageRanges.cs
- BoolExpressionVisitors.cs
- SafeNativeMethods.cs
- TypeToken.cs
- MsmqIntegrationChannelListener.cs
- XmlAttributeAttribute.cs
- PropertyTabChangedEvent.cs
- BaseDataList.cs
- COMException.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ProviderCommandInfoUtils.cs
- Grammar.cs
- TableLayoutColumnStyleCollection.cs
- SingleKeyFrameCollection.cs
- DesignTimeTemplateParser.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- PopupRootAutomationPeer.cs
- BodyGlyph.cs
- SinglePageViewer.cs
- BatchWriter.cs
- OutArgumentConverter.cs
- codemethodreferenceexpression.cs
- PictureBox.cs
- RbTree.cs
- EventLogTraceListener.cs
- RowToParametersTransformer.cs
- CompilerCollection.cs
- ThemeableAttribute.cs
- ExitEventArgs.cs
- FtpWebRequest.cs
- CancelRequestedQuery.cs
- CreationContext.cs
- Bidi.cs
- SystemColors.cs
- SystemIcons.cs
- PinnedBufferMemoryStream.cs
- SafeEventLogReadHandle.cs
- ObjectConverter.cs
- CodeRemoveEventStatement.cs
- DES.cs
- Decoder.cs
- SecureStringHasher.cs
- SqlCrossApplyToCrossJoin.cs
- DataGridItem.cs
- UInt16Converter.cs
- XmlBoundElement.cs
- SyndicationSerializer.cs
- StringFunctions.cs
- WhitespaceRuleReader.cs
- PreviewPageInfo.cs
- AutoScrollExpandMessageFilter.cs
- ChunkedMemoryStream.cs
- InstancePersistenceException.cs
- BitStack.cs
- ScalarType.cs