Пример #1
0
        public ConflictResolutionResult Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, out List <MigrationAction> actions)
        {
            actions = null;
            if (rule.ActionRefNameGuid.Equals(new InvalidFieldValueConflictUseValueMapAction().ReferenceName))
            {
                return(ResolveByValueMap(conflict, rule, out actions));
            }
            else if (rule.ActionRefNameGuid.Equals(new InvalidFieldConflictDropFieldAction().ReferenceName))
            {
                return(ResolveByDroppingField(conflict, rule, out actions));
            }
            else if (rule.ActionRefNameGuid.Equals(new ManualConflictResolutionAction().ReferenceName))
            {
                return(new ConflictResolutionResult(true, ConflictResolutionType.Other));
            }
            else if (rule.ActionRefNameGuid.Equals(new UpdatedConfigurationResolutionAction().ReferenceName))
            {
                return(Toolkit.Utility.ResolveConflictByUpdateConfig(rule));
            }
            else if (rule.ActionRefNameGuid.Equals(new SkipConflictedActionResolutionAction().ReferenceName))
            {
                return(SkipConflictedActionResolutionAction.SkipConflict(conflict, true));
            }

            return(new ConflictResolutionResult(false, ConflictResolutionType.Other));
        }
Пример #2
0
 private ConflictResolutionResult SkipConflictedAction(
     MigrationConflict conflict,
     ConflictResolutionRule rule,
     out List <MigrationAction> actions)
 {
     actions = null;
     return(SkipConflictedActionResolutionAction.SkipConflict(conflict, true));
 }
Пример #3
0
        public ConflictResolutionResult Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, out List <MigrationAction> actions)
        {
            actions = null;

            if (rule.ActionRefNameGuid.Equals(new ManualConflictResolutionAction().ReferenceName))
            {
                return(ManualResolve(conflict, rule, out actions));
            }
            else if (rule.ActionRefNameGuid.Equals(new SkipConflictedActionResolutionAction().ReferenceName))
            {
                return(SkipConflictedActionResolutionAction.SkipConflict(conflict, true));
            }

            return(new ConflictResolutionResult(false, ConflictResolutionType.Other));
        }
Пример #4
0
        /// <summary>
        /// Resolves the subject conflict with the passed-in rule.
        /// </summary>
        /// <param name="conflict">The conflict to be resolved</param>
        /// <param name="rule">The candidate rule</param>
        /// <param name="actions">The migration actions that are generated as part of the resolution plan.</param>
        /// <returns>The conflict resolution result</returns>
        public ConflictResolutionResult Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, out List <MigrationAction> actions)
        {
            actions = null;
            if (rule.ActionRefNameGuid.Equals(new HistoryNotFoundSubmitMissingChangesAction().ReferenceName))
            {
                return(ResolveBySubmitMissingChanges(serviceContainer, conflict, rule, out actions));
            }
            else if (rule.ActionRefNameGuid.Equals(new HistoryNotFoundUpdateConversionHistoryAction().ReferenceName))
            {
                return(ResolveByUpdateConversionHisotry(conflict, rule, out actions));
            }
            else if (rule.ActionRefNameGuid.Equals(new SkipConflictedActionResolutionAction().ReferenceName))
            {
                return(SkipConflictedActionResolutionAction.SkipConflict(conflict, true));
            }

            return(new ConflictResolutionResult(false, ConflictResolutionType.Other));
        }
Пример #5
0
        public ConflictResolutionResult Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, out List <MigrationAction> actions)
        {
            actions = null;

            if (rule.ActionRefNameGuid.Equals(new ManualConflictResolutionAction().ReferenceName))
            {
                return(new ConflictResolutionResult(true, ConflictResolutionType.Other));
            }
            else if (rule.ActionRefNameGuid.Equals(new WITUnmappedWITConflictUpdateWITMappingAction().ReferenceName))
            {
                return(ResolveByUsingWITMapping(conflict, rule));
            }
            else if (rule.ActionRefNameGuid.Equals(new WITUnmappedWITConflictExcludeWITInSessionFilter().ReferenceName) ||
                     rule.ActionRefNameGuid.Equals(new SkipConflictedActionResolutionAction().ReferenceName))
            {
                return(SkipConflictedActionResolutionAction.SkipConflict(conflict, true));
            }
            else
            {
                return(new ConflictResolutionResult(false, ConflictResolutionType.Other));
            }
        }