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
- BinaryKeyIdentifierClause.cs
- MILUtilities.cs
- DocumentPageTextView.cs
- TogglePatternIdentifiers.cs
- cookie.cs
- DescriptionAttribute.cs
- NetworkInterface.cs
- AssemblyBuilder.cs
- DataComponentMethodGenerator.cs
- GeneratedView.cs
- MatrixCamera.cs
- AddingNewEventArgs.cs
- TypeBuilder.cs
- AutomationPatternInfo.cs
- SecurityListenerSettingsLifetimeManager.cs
- FileUtil.cs
- SymbolPair.cs
- FilteredReadOnlyMetadataCollection.cs
- HTMLTextWriter.cs
- IndexObject.cs
- DesignerHelpers.cs
- HierarchicalDataBoundControl.cs
- BitmapPalettes.cs
- StoreAnnotationsMap.cs
- InkCanvas.cs
- namescope.cs
- UpdateException.cs
- MessageContractAttribute.cs
- ExceptionValidationRule.cs
- NegationPusher.cs
- _LocalDataStoreMgr.cs
- CompressionTransform.cs
- TextContainerChangeEventArgs.cs
- XmlNodeList.cs
- CanExecuteRoutedEventArgs.cs
- TimeZone.cs
- ParameterCollection.cs
- StylusPointProperty.cs
- SchemaMapping.cs
- ObjectItemCollection.cs
- MembershipPasswordException.cs
- ViewManager.cs
- ChangeTracker.cs
- RuleInfoComparer.cs
- ClickablePoint.cs
- SecurityPolicySection.cs
- MultilineStringConverter.cs
- MDIWindowDialog.cs
- CardSpacePolicyElement.cs
- ViewBase.cs
- ArrayList.cs
- BamlMapTable.cs
- DataGridViewRowsRemovedEventArgs.cs
- DataGridViewCellLinkedList.cs
- MergeLocalizationDirectives.cs
- securitymgrsite.cs
- PolicyLevel.cs
- PersonalizableAttribute.cs
- RequestTimeoutManager.cs
- SortKey.cs
- MulticastOption.cs
- SqlClientPermission.cs
- Normalization.cs
- __FastResourceComparer.cs
- EventArgs.cs
- WebServiceEnumData.cs
- EventDescriptor.cs
- CodeBinaryOperatorExpression.cs
- Cursor.cs
- ArglessEventHandlerProxy.cs
- mansign.cs
- GeometryCombineModeValidation.cs
- ByteAnimationBase.cs
- NavigationExpr.cs
- ScrollContentPresenter.cs
- querybuilder.cs
- Token.cs
- ToolBar.cs
- CompiledAction.cs
- FormsAuthenticationConfiguration.cs
- ConstraintStruct.cs
- XXXInfos.cs
- CallbackDebugBehavior.cs
- RowBinding.cs
- WebColorConverter.cs
- Crypto.cs
- OrthographicCamera.cs
- DecimalMinMaxAggregationOperator.cs
- milrender.cs
- HandlerMappingMemo.cs
- DbXmlEnabledProviderManifest.cs
- _TLSstream.cs
- HuffmanTree.cs
- Int32Animation.cs
- UserInitiatedNavigationPermission.cs
- XmlCharCheckingWriter.cs
- Int32RectValueSerializer.cs
- Journal.cs
- TemplateBindingExpression.cs
- XmlSortKey.cs