public EmailSender(ParametersManager parameterManager) { _parameterManager = parameterManager; _smtpClient = new SmtpClient { ServerCertificateValidationCallback = (_, _, _, _) => true }; }
public PluginController() : base( "Synth.NET", new VstProductInfo("Test", " ", 1), VstPluginCategory.Synth, VstPluginCapabilities.None, 0, 1) { MidiListener = new MidiListener(); AudioProcessor = new AudioProcessor(this); PluginUI.Instance.PluginController = this; ParametersManager.SetParameters(AudioProcessor.CreateParameters()); ParametersManager.SetPrograms(new Dictionary <string, string> { { "Sine", Properties.Resources.Sine }, { "Wooble", Properties.Resources.Wooble }, { "Whistle", Properties.Resources.Whistle }, { "Synth", Properties.Resources.Synth1 }, { "BassLong", Properties.Resources.Bass_Long }, { "BassShort", Properties.Resources.Bass_Short }, { "Siren", Properties.Resources.Siren }, { "8BitSeq", Properties.Resources._8bitMadness }, { "WobbleSeq", Properties.Resources.WoobleMad } }.Select(x => ParametersManager.CreateProgramFromSerializedParameters(x.Key, x.Value))); }
public SignInController(EmailSender emailSender, ParametersManager parameterManager, UserManager <IdentityUser <Guid> > userManager, SignInManager <IdentityUser <Guid> > signInManager) { _emailSender = emailSender; _parameterManager = parameterManager; _userManager = userManager; _signInManager = signInManager; }
public UsersManagerController(BaseContext context, EmailSender emailSender, ParametersManager parameterManager, UserManager <IdentityUser <Guid> > userManager) { _context = context; _emailSender = emailSender; _parameterManager = parameterManager; _userManager = userManager; }
public PluginController() : base( "Syntage", new VstProductInfo("Study Synth", "lis355", 1000), VstPluginCategory.Synth, VstPluginCapabilities.None, 0, new FourCharacterCode("SNTG").ToInt32()) { Log.Print("Initializing"); MidiListener = new MidiListener(); AudioProcessor = new AudioProcessor(this); PluginUI.Instance.PluginController = this; ParametersManager.SetParameters(AudioProcessor.CreateParameters()); ParametersManager.SetPrograms(new Dictionary <string, string> { { "Sine", Properties.Resources.Sine }, { "Synt1", Properties.Resources.Synt1 }, { "Synt2", Properties.Resources.Synt2 }, { "Synt3", Properties.Resources.Synt3 }, { "Butterfly", Properties.Resources.Butterfly }, { "Telephone", Properties.Resources.Telephone }, { "Elastic", Properties.Resources.Elastic }, { "FineFeedback", Properties.Resources.FineFeedback } }.Select(x => ParametersManager.CreateProgramFromSerializedParameters(x.Key, x.Value))); }
public HomeController(SignInManager <IdentityUser <Guid> > signInManager, PostsManager postsManager, EmailSender emailSender, ParametersManager parametersManager, ReCaptchaValidator reCaptchaValidator) { _signInManager = signInManager; _postsManager = postsManager; _emailSender = emailSender; _parametersManager = parametersManager; _reCaptchaValidator = reCaptchaValidator; }
public ExpressionSqlGenerator(IDbProviderExpressions provider, ITableInfoFactory factory, IEscapeIdentifier escape,ParametersManager param=null) { _sb = new StringBuilder(); _provider = provider; _factory = factory; _escape = escape; Parameters = param ?? new ParametersManager(); }
public void format_pagination_keeps_existing_order_by() { var pm = new ParametersManager(); var page = new Pagination(); _sut.FormatQueryPagination("order by Id", page, pm) .Should().Be("order by Id OFFSET @0 ROWS FETCH NEXT @1 ROWS ONLY"); pm.ToArray().Should().BeEquivalentTo(new[] { page.Skip, page.PageSize }); }
private void CtlMenuParameters_Click(object sender, RoutedEventArgs e) { var parametersManager = new ParametersManager(Manager); if (parametersManager.ShowDialog() == true) { RefreshDataManager(); } }
public WhereCriteriaTests() { _sb = new StringBuilder(); _pm = new ParametersManager(); _fRm = new Mock <IDbProviderExpressionHelper>(); _fRm.Setup(d => d.EscapeName(It.IsAny <string>())).Returns((string v) => SqlServerProvider.EscapeIdentifier(v)); _fRm.Setup(d => d.FormatBoolean(It.IsAny <bool>())).Returns((bool v) => v == true?"1":"0"); _w = new ExpressionWriter(_sb, _fRm.Object, _pm); }
public WhereCriteriaTests() { _sb = new StringBuilder(); _pm = new ParametersManager(); _fRm = new Mock<IDbProviderExpressionHelper>(); _fRm.Setup(d => d.EscapeName(It.IsAny<string>())).Returns((string v) => SqlServerProvider.EscapeIdentifier(v)); _fRm.Setup(d => d.FormatBoolean(It.IsAny<bool>())).Returns((bool v) => v==true?"1":"0"); _w = new ExpressionWriter(_sb,_fRm.Object,_pm); }
public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm) { if (!sql.Contains("order by")) { sql += " order by 1"; } pm.AddValues(page.Skip, page.PageSize); return(string.Format("{2} OFFSET @{0} ROWS FETCH NEXT @{1} ROWS ONLY", pm.CurrentIndex - 2, pm.CurrentIndex - 1, sql)); }
public ContentController(SignInManager <IdentityUser <Guid> > signInManager, TitlesManager <Title> titlesManager, ChapterManager <Chapter> chapterManager, PagesManager <Page> pagesManager, ChapterArchiver chapterArchiver, ParametersManager parametersManager, IMemoryCache memoryCache) { _signInManager = signInManager; _titlesManager = titlesManager; _chapterManager = chapterManager; _pagesManager = pagesManager; _chapterArchiver = chapterArchiver; _parametersManager = parametersManager; _memoryCache = memoryCache; }
public ReportGenerator(ConfigurationManager configuration, ResultsManager results, ParametersManager parameters, BenchmarksManager benchmarks, EnvironmentManager environment) { _configuration = configuration; _results = results; _parameters = parameters; _benchmarks = benchmarks; _environment = environment; }
public BenchmarkRunner() { _configuration = new ConfigurationManager(); _parameters = new ParametersManager(_configuration); _results = new ResultsManager(); _benchmarks = new BenchmarksManager(_parameters); _execution = new ExecutionManager(_configuration, _results); _environment = new EnvironmentManager(); _report = new ReportGenerator(_configuration, _results, _parameters, _benchmarks, _environment); }
public List <ParameterLabel> GetParameters() { var visibleGroupsIds = Config.GetArray(Const.Param.VisibleGroupsIds); var parametersLabels = ParametersManager.GetVisibleParameters(this).Where(p => p.SelectedGroups().Count == 0 || p.SelectedGroups().Any(g => visibleGroupsIds.Contains(g.Id))).Select(p => new ParameterLabel(p, Config)).ToList(); /* * foreach (var parameter in parametersLabels) * { * parameter.Values = ValuesManager.GetValues(parameter.Id, Config); * } */ return(parametersLabels); }
public static async Task <T> GetModel <T>(this ParametersManager parametersManager) where T : new() { var t = new T(); foreach (var property in t.GetType().GetProperties().Where(property => Attribute.IsDefined(property, typeof(ParameterAttribute)))) { var attribute = (ParameterAttribute)property.GetCustomAttribute(typeof(ParameterAttribute)) !; var parameter = await parametersManager.GetValue <object?>(attribute.ParameterType); if (parameter == null) { continue; } property.SetValue(t, Convert.ChangeType(parameter, Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType)); } return(t); }
static void Main() { var broker = new Broker(); IPlugin plugin = new PluginLog(); plugin.Handler = (eventName, sender, args) => Console.WriteLine("[plugin]: event = {0}, sender = ({1}), args = ({2})", eventName, sender, args); broker.PluginList.Add(plugin); var parameter = new Parameter(broker) { Name = "CD" }; var manager = new ParametersManager(broker); parameter.Value = 10; Parameter parameter2 = parameter.Clone(); parameter2.Name = "HEIGHT"; parameter2.Value = 5; }
public ParameterName(string parameterPrefix, ParametersManager parametersManager) : base(parameterPrefix + "Num", "LFO Parameter Number", "Num", -1, 34, 1, false) { _parametersManager = parametersManager; }
public ExpressionSqlGenerator(IDbProviderExpressions provider, ITableInfoFactory factory, IEscapeIdentifier escape, ParametersManager param = null) { _sb = new StringBuilder(); _provider = provider; _factory = factory; _escape = escape; Parameters = param ?? new ParametersManager(); }
public abstract string FormatQueryPagination(string sql, Pagination page, ParametersManager pm);
public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm) => $"{sql} limit {page.Skip},{page.PageSize}";
public static async Task <bool> Save(this ParametersManager parametersManager, ParameterTypes parameterTypes, string?value) => await parametersManager.Save((ushort)parameterTypes, value);
public static async Task <T> GetValue <T>(this ParametersManager parametersManager, ParameterTypes parameterTypes) => await parametersManager.GetValue <T>((ushort)parameterTypes);
protected SyntagePlugin(string name, VstProductInfo productInfo, VstPluginCategory category, VstPluginCapabilities capabilities, int initialDelay, int pluginID) : base(name, productInfo, category, capabilities, initialDelay, pluginID) { ParametersManager = new ParametersManager(); }
public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm) => sql + " limit";
public ExcelReader(ParametersManager p) { pm = p; data = new ArrayList(); readFile(); }
/// <summary> /// BaseAction Ctor. Do not change anything unless you would like to initialize local class members /// The Ctor passes the logger module and the plug-in account's parameters to base. /// Do not change Ctor's definition not create another. /// <param name="accountList"></param> /// <param name="logger"></param> public BaseAction(List <IAccount> accountList, ILogger logger) : base(accountList, logger) { // Init ParametersManager ParametersAPI = new ParametersManager(); }
public ReCaptchaValidator(ParametersManager parameterManager, IHttpClientFactory httpClientFactory) { _parameterManager = parameterManager; _httpClient = httpClientFactory.CreateClient(); }
public ParametersManagerController(ParametersManager parametersManager, IOptions <IpRateLimitOptions> rateLimitOptions, IIpPolicyStore ipPolicyStore) { _parametersManager = parametersManager; _rateLimitOptions = rateLimitOptions.Value; _ipPolicyStore = ipPolicyStore; }
public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm) { throw new NotSupportedException(); }
public BenchmarksManager(ParametersManager parameters) { _parameters = parameters; }