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
- ShortcutKeysEditor.cs
- TableSectionStyle.cs
- AccessKeyManager.cs
- PageAsyncTask.cs
- WSSecurityTokenSerializer.cs
- SafeFreeMibTable.cs
- HttpApplicationFactory.cs
- ListViewTableCell.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- LayoutTableCell.cs
- OnOperation.cs
- MessageContractAttribute.cs
- VsPropertyGrid.cs
- XmlnsCompatibleWithAttribute.cs
- MetadataCache.cs
- CellRelation.cs
- XPathNodeInfoAtom.cs
- StreamingContext.cs
- TreeNodeBindingDepthConverter.cs
- MailMessageEventArgs.cs
- PageAsyncTaskManager.cs
- CurrencyWrapper.cs
- WebGetAttribute.cs
- XmlSerializerSection.cs
- FaultDesigner.cs
- FormViewInsertedEventArgs.cs
- DataGridComboBoxColumn.cs
- TraceUtility.cs
- ArgumentNullException.cs
- AccessedThroughPropertyAttribute.cs
- WindowsScrollBarBits.cs
- PerformanceCounterLib.cs
- AnnotationHighlightLayer.cs
- TypeKeyValue.cs
- EpmSyndicationContentSerializer.cs
- IPEndPointCollection.cs
- GotoExpression.cs
- LayoutInformation.cs
- TreeNodeStyleCollection.cs
- DaylightTime.cs
- SelectorAutomationPeer.cs
- SoapElementAttribute.cs
- XmlQuerySequence.cs
- Parser.cs
- SqlException.cs
- SoundPlayerAction.cs
- XmlSchemaParticle.cs
- WebReferencesBuildProvider.cs
- DescendentsWalker.cs
- InvokePattern.cs
- FileLoadException.cs
- SimpleExpression.cs
- CodeParameterDeclarationExpression.cs
- TreeNodeMouseHoverEvent.cs
- ObjectViewFactory.cs
- Binding.cs
- GridViewRowEventArgs.cs
- CatalogZoneBase.cs
- HandleExceptionArgs.cs
- CompensationToken.cs
- DeviceContexts.cs
- MobileRedirect.cs
- LoginView.cs
- BaseTreeIterator.cs
- followingsibling.cs
- DeclarationUpdate.cs
- MbpInfo.cs
- BitmapData.cs
- RangeBase.cs
- QueryStringParameter.cs
- RadioButtonFlatAdapter.cs
- String.cs
- HitTestFilterBehavior.cs
- QuaternionRotation3D.cs
- WinEventQueueItem.cs
- cookieexception.cs
- FixedSchema.cs
- IFormattable.cs
- WsatServiceAddress.cs
- SymmetricCryptoHandle.cs
- Boolean.cs
- Int32Converter.cs
- PopupRootAutomationPeer.cs
- TextTreeRootTextBlock.cs
- DrawingContextWalker.cs
- Queue.cs
- DefaultTextStoreTextComposition.cs
- SqlServer2KCompatibilityAnnotation.cs
- DiagnosticTrace.cs
- XamlTreeBuilderBamlRecordWriter.cs
- Help.cs
- HttpModuleActionCollection.cs
- serverconfig.cs
- ComponentResourceManager.cs
- LicenseContext.cs
- FocusWithinProperty.cs
- EditorBrowsableAttribute.cs
- XmlCharType.cs
- util.cs
- TypeToken.cs