Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Validation / BasicKeyConstraint.cs / 1305376 / BasicKeyConstraint.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Mapping.ViewGeneration.Structures; using System.Collections.Generic; namespace System.Data.Mapping.ViewGeneration.Validation { using BasicSchemaConstraints = SchemaConstraints; // Class representing a key constraint on the basic cell relations internal class BasicKeyConstraint : KeyConstraint { #region Constructor // Constructs a key constraint for the given relation and keyslots internal BasicKeyConstraint(BasicCellRelation relation, IEnumerable keySlots) : base(relation, keySlots, MemberProjectedSlot.SpecificEqualityComparer) { } #endregion #region Methods // effects: Propagates this constraint from the basic cell relation // to the corresponding view cell relation and returns the new constraint // If all the key slots are not being projected, returns null internal ViewKeyConstraint Propagate() { ViewCellRelation viewCellRelation = CellRelation.ViewCellRelation; // If all slots appear in the projection, propagate key constraint List viewSlots = new List (); foreach (MemberProjectedSlot keySlot in KeySlots) { ViewCellSlot viewCellSlot = viewCellRelation.LookupViewSlot(keySlot); if (viewCellSlot == null) { // Slot is missing -- no key constraint on the view relation return null; } viewSlots.Add(viewCellSlot); } // Create a key on view relation ViewKeyConstraint viewKeyConstraint = new ViewKeyConstraint(viewCellRelation, viewSlots); return viewKeyConstraint; } #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
- MenuItemCollection.cs
- ThrowHelper.cs
- Enlistment.cs
- ContentValidator.cs
- BaseServiceProvider.cs
- UInt32.cs
- BamlLocalizationDictionary.cs
- DependencyPropertyChangedEventArgs.cs
- OutputCacheSection.cs
- TransformPattern.cs
- SettingsBindableAttribute.cs
- SaveFileDialog.cs
- EntityDataSourceStatementEditor.cs
- ImportContext.cs
- KnownTypesProvider.cs
- CommandValueSerializer.cs
- Flowchart.cs
- RoleManagerEventArgs.cs
- CommandBinding.cs
- DataGridTextColumn.cs
- Polygon.cs
- FontConverter.cs
- SqlNotificationEventArgs.cs
- FileDataSourceCache.cs
- MultiSelector.cs
- SchemaMapping.cs
- NativeMethods.cs
- SqlCacheDependency.cs
- IHttpResponseInternal.cs
- ToolBarButton.cs
- ServiceDescriptionSerializer.cs
- ReverseInheritProperty.cs
- JsonObjectDataContract.cs
- CreateSequenceResponse.cs
- CompilerGeneratedAttribute.cs
- SequentialUshortCollection.cs
- ErrorEventArgs.cs
- TableColumn.cs
- SpeechSeg.cs
- DispatcherExceptionEventArgs.cs
- Vector3DCollectionConverter.cs
- HMACRIPEMD160.cs
- TransactionOptions.cs
- Context.cs
- WmlLiteralTextAdapter.cs
- SystemPens.cs
- StreamedWorkflowDefinitionContext.cs
- TypeHelpers.cs
- DocobjHost.cs
- ChildTable.cs
- SqlBulkCopy.cs
- BinaryOperationBinder.cs
- ModelToObjectValueConverter.cs
- _RequestCacheProtocol.cs
- LineBreakRecord.cs
- AppDomainManager.cs
- Attribute.cs
- WmlCalendarAdapter.cs
- CorrelationActionMessageFilter.cs
- DynamicValidatorEventArgs.cs
- AnnotationService.cs
- Stroke2.cs
- PropertyKey.cs
- DnsCache.cs
- XmlCustomFormatter.cs
- connectionpool.cs
- XmlSerializerAssemblyAttribute.cs
- EntityKeyElement.cs
- ParameterEditorUserControl.cs
- SHA384.cs
- SQLInt16.cs
- CompiledQuery.cs
- WebContext.cs
- Panel.cs
- IdleTimeoutMonitor.cs
- DateTimeStorage.cs
- ProgressChangedEventArgs.cs
- ResourcePermissionBaseEntry.cs
- RadioButtonAutomationPeer.cs
- Screen.cs
- TriggerBase.cs
- SecurityException.cs
- DataObjectMethodAttribute.cs
- METAHEADER.cs
- RequestUriProcessor.cs
- XPathNavigatorKeyComparer.cs
- FolderLevelBuildProvider.cs
- MultiSelectRootGridEntry.cs
- CapabilitiesAssignment.cs
- TransformationRules.cs
- Site.cs
- HwndHost.cs
- SqlDependencyUtils.cs
- ConditionalAttribute.cs
- StylusPlugInCollection.cs
- PasswordTextContainer.cs
- WindowsGraphicsWrapper.cs
- DesignerDeviceConfig.cs
- DoubleUtil.cs
- SystemBrushes.cs