public ReplaceOptions( MatchEvaluator matchEvaluator, ReplaceFunctions functions = ReplaceFunctions.None, bool cultureInvariant = false) { MatchEvaluator = matchEvaluator ?? throw new ArgumentNullException(nameof(matchEvaluator)); Functions = functions; CultureInvariant = cultureInvariant; }
public ReplaceOptions( string?replacement, ReplaceFunctions functions = ReplaceFunctions.None, bool cultureInvariant = false) { Replacement = replacement ?? ""; Functions = functions; CultureInvariant = cultureInvariant; }
public RenameOptions( string replacement, ReplaceFunctions functions = ReplaceFunctions.None, bool cultureInvariant = false, ConflictResolution conflictResolution = ConflictResolution.Skip) : base(replacement, functions, cultureInvariant) { ConflictResolution = conflictResolution; }
public RenameOptions( MatchEvaluator matchEvaluator, ReplaceFunctions functions = ReplaceFunctions.None, bool cultureInvariant = false, ConflictResolution conflictResolution = ConflictResolution.Skip) : base(matchEvaluator, functions, cultureInvariant) { ConflictResolution = conflictResolution; }
public ReplaceOptions( string replacement = null, MatchEvaluator matchEvaluator = null, ReplaceFunctions functions = ReplaceFunctions.None, bool cultureInvariant = false) { Replacement = replacement; MatchEvaluator = matchEvaluator; if (MatchEvaluator == null) { if (replacement != null || functions == ReplaceFunctions.None) { replacement ??= ""; MatchEvaluator = new MatchEvaluator(match => match.Result(replacement)); } } Functions = functions; CultureInvariant = cultureInvariant; }