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
- CancellationScope.cs
- RootBrowserWindow.cs
- DataGridCellAutomationPeer.cs
- ScrollContentPresenter.cs
- TextProviderWrapper.cs
- HelloMessageCD1.cs
- ObjectMemberMapping.cs
- MetadataItem_Static.cs
- SingleAnimation.cs
- ExpressionBuilder.cs
- TreeNode.cs
- X509CertificateEndpointIdentity.cs
- DataGridViewTextBoxEditingControl.cs
- SmtpLoginAuthenticationModule.cs
- _Events.cs
- UserValidatedEventArgs.cs
- ICollection.cs
- ObjectSet.cs
- Separator.cs
- ProfileManager.cs
- UnsafeNativeMethods.cs
- SQLString.cs
- OracleRowUpdatedEventArgs.cs
- HtmlInputSubmit.cs
- SelectionChangedEventArgs.cs
- SystemIPInterfaceProperties.cs
- ValidationRuleCollection.cs
- keycontainerpermission.cs
- EntitySqlQueryCacheKey.cs
- WebChannelFactory.cs
- CodeParameterDeclarationExpressionCollection.cs
- ClientOptions.cs
- CookieHandler.cs
- TheQuery.cs
- IImplicitResourceProvider.cs
- BrowserCapabilitiesFactoryBase.cs
- PrimitiveXmlSerializers.cs
- ParallelLoopState.cs
- LineUtil.cs
- SqlCommandBuilder.cs
- RegexWorker.cs
- EventsTab.cs
- MetafileHeaderWmf.cs
- Thread.cs
- NumberSubstitution.cs
- CompilationSection.cs
- Point3DCollection.cs
- ScrollBar.cs
- NonSerializedAttribute.cs
- ExpressionBuilder.cs
- FileReservationCollection.cs
- ToolboxItem.cs
- DeploymentSectionCache.cs
- DataGridRow.cs
- TableLayoutRowStyleCollection.cs
- ContractComponent.cs
- Exceptions.cs
- ControlFilterExpression.cs
- NominalTypeEliminator.cs
- EntityCommandExecutionException.cs
- RangeBase.cs
- SafeArrayTypeMismatchException.cs
- InfoCardKeyedHashAlgorithm.cs
- TextCompositionManager.cs
- AccessorTable.cs
- ActivitySurrogateSelector.cs
- WindowsListViewGroup.cs
- HttpCapabilitiesEvaluator.cs
- ProxyWebPartManagerDesigner.cs
- CatalogPart.cs
- GeneralTransform2DTo3D.cs
- TextServicesCompartment.cs
- ExpressionBinding.cs
- CreateUserWizard.cs
- TdsEnums.cs
- BooleanFunctions.cs
- OdbcInfoMessageEvent.cs
- StatusBarItem.cs
- SerializationUtility.cs
- VoiceChangeEventArgs.cs
- DateTimeFormatInfo.cs
- ApplicationDirectoryMembershipCondition.cs
- DocumentGrid.cs
- Lease.cs
- OracleBFile.cs
- PropertyGroupDescription.cs
- TextTreeTextBlock.cs
- FileRecordSequenceCompletedAsyncResult.cs
- XmlBaseWriter.cs
- SectionInput.cs
- ColumnResizeAdorner.cs
- BitmapEffectDrawing.cs
- CollectionViewProxy.cs
- WriteableBitmap.cs
- Scene3D.cs
- MainMenu.cs
- SharedUtils.cs
- GeneralTransform3DTo2DTo3D.cs
- ElementsClipboardData.cs
- MenuCommands.cs