using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FrameworkDAL.DTO.SchedulerTaskGenerator { public sealed class SchedulerRunOptions { public string Enable { get; set; } public string Server { get; set; } public string DatabaseName { get; set; } public string UserName { get; set; } public string Password { get; set; } public string ConnectionTemplate { get; set; } public bool IsEnabled => string.Equals(Enable, "Y", StringComparison.OrdinalIgnoreCase); public string BuildConnectionString() { return ConnectionTemplate .Replace("{Server}", Server) .Replace("{DatabaseName}", DatabaseName) .Replace("{UserName}", UserName) .Replace("{Password}", Password); } } }