Ejemplo n.º 1
0
        public static PlasticSCMMergeSettings BasicRun(string sourceObjectSpec, PlasticSCMMergeSession session = null)
        {
            Ensure.String.IsNotNullOrWhiteSpace(sourceObjectSpec, nameof(sourceObjectSpec));

            PlasticSCMMergeSettings result = new PlasticSCMMergeSettings
            {
                TryMerge         = false,
                SourceObjectSpec = sourceObjectSpec,
                Session          = session
            };

            return(result);
        }
Ejemplo n.º 2
0
        public static PlasticSCMMergeSettings BasicDirectoryConflictResolution(string sourceObjectSpec, PlasticSCMMergeSession session, int conflictIndex, PlasticSCMMergeResolutionOptions resolution,
                                                                               string resolutionInfo = null)
        {
            Ensure.String.IsNotNullOrWhiteSpace(sourceObjectSpec, nameof(sourceObjectSpec));
            if (resolution == PlasticSCMMergeResolutionOptions.Rename)
            {
                Ensure.String.IsNotNullOrWhiteSpace(resolutionInfo, nameof(resolutionInfo));
            }

            Ensure.Any.IsNotNull(session, nameof(session));

            PlasticSCMMergeSettings result = new PlasticSCMMergeSettings
            {
                TryMerge          = false,
                SourceObjectSpec  = sourceObjectSpec,
                ResolveConflict   = true,
                ResolutionOptions = resolution,
                ConflictIndex     = conflictIndex,
                ResolutionInfo    = resolutionInfo,
                Session           = session
            };

            return(result);
        }