コード例 #1
0
 public EmailSender(ParametersManager parameterManager)
 {
     _parameterManager = parameterManager;
     _smtpClient       = new SmtpClient {
         ServerCertificateValidationCallback = (_, _, _, _) => true
     };
 }
コード例 #2
0
        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)));
        }
コード例 #3
0
 public SignInController(EmailSender emailSender, ParametersManager parameterManager, UserManager <IdentityUser <Guid> > userManager, SignInManager <IdentityUser <Guid> > signInManager)
 {
     _emailSender      = emailSender;
     _parameterManager = parameterManager;
     _userManager      = userManager;
     _signInManager    = signInManager;
 }
コード例 #4
0
 public UsersManagerController(BaseContext context, EmailSender emailSender, ParametersManager parameterManager, UserManager <IdentityUser <Guid> > userManager)
 {
     _context          = context;
     _emailSender      = emailSender;
     _parameterManager = parameterManager;
     _userManager      = userManager;
 }
コード例 #5
0
ファイル: PluginController.cs プロジェクト: walney/Syntage
        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)));
        }
コード例 #6
0
ファイル: HomeController.cs プロジェクト: Dinokin/WeebReader
 public HomeController(SignInManager <IdentityUser <Guid> > signInManager, PostsManager postsManager, EmailSender emailSender, ParametersManager parametersManager, ReCaptchaValidator reCaptchaValidator)
 {
     _signInManager      = signInManager;
     _postsManager       = postsManager;
     _emailSender        = emailSender;
     _parametersManager  = parametersManager;
     _reCaptchaValidator = reCaptchaValidator;
 }
コード例 #7
0
 public ExpressionSqlGenerator(IDbProviderExpressions provider, ITableInfoFactory factory, IEscapeIdentifier escape,ParametersManager param=null)
 {
     _sb = new StringBuilder();
     _provider = provider;
     _factory = factory;
     _escape = escape;
     Parameters = param ?? new ParametersManager();
 }
コード例 #8
0
        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 });
        }
コード例 #9
0
        private void CtlMenuParameters_Click(object sender, RoutedEventArgs e)
        {
            var parametersManager = new ParametersManager(Manager);

            if (parametersManager.ShowDialog() == true)
            {
                RefreshDataManager();
            }
        }
コード例 #10
0
ファイル: WhereCriteriaTests.cs プロジェクト: snielsson/SqlFu
 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);
 }
コード例 #11
0
ファイル: WhereCriteriaTests.cs プロジェクト: forbjok/SqlFu
 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);        
 }
コード例 #12
0
 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));
 }
コード例 #13
0
 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;
 }
コード例 #14
0
 public ReportGenerator(ConfigurationManager configuration,
                        ResultsManager results, ParametersManager parameters,
                        BenchmarksManager benchmarks, EnvironmentManager environment)
 {
     _configuration = configuration;
     _results       = results;
     _parameters    = parameters;
     _benchmarks    = benchmarks;
     _environment   = environment;
 }
コード例 #15
0
 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);
 }
コード例 #16
0
        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);
        }
コード例 #17
0
        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);
        }
コード例 #18
0
        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;
        }
コード例 #19
0
 public ParameterName(string parameterPrefix, ParametersManager parametersManager) :
     base(parameterPrefix + "Num", "LFO Parameter Number", "Num", -1, 34, 1, false)
 {
     _parametersManager = parametersManager;
 }
コード例 #20
0
 public ExpressionSqlGenerator(IDbProviderExpressions provider, ITableInfoFactory factory, IEscapeIdentifier escape, ParametersManager param = null)
 {
     _sb        = new StringBuilder();
     _provider  = provider;
     _factory   = factory;
     _escape    = escape;
     Parameters = param ?? new ParametersManager();
 }
コード例 #21
0
 public abstract string FormatQueryPagination(string sql, Pagination page, ParametersManager pm);
コード例 #22
0
 public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm)
 => $"{sql} limit {page.Skip},{page.PageSize}";
コード例 #23
0
 public static async Task <bool> Save(this ParametersManager parametersManager, ParameterTypes parameterTypes, string?value) => await parametersManager.Save((ushort)parameterTypes, value);
コード例 #24
0
 public static async Task <T> GetValue <T>(this ParametersManager parametersManager, ParameterTypes parameterTypes) => await parametersManager.GetValue <T>((ushort)parameterTypes);
コード例 #25
0
 protected SyntagePlugin(string name, VstProductInfo productInfo, VstPluginCategory category, VstPluginCapabilities capabilities,
                         int initialDelay, int pluginID) : base(name, productInfo, category, capabilities, initialDelay, pluginID)
 {
     ParametersManager = new ParametersManager();
 }
コード例 #26
0
ファイル: DbProvider.cs プロジェクト: sapiens/SqlFu
 public abstract string FormatQueryPagination(string sql, Pagination page, ParametersManager pm);
コード例 #27
0
ファイル: FakeDbProvider.cs プロジェクト: raihansazal/SqlFu
 public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm)
 => sql + " limit";
コード例 #28
0
 public ExcelReader(ParametersManager p)
 {
     pm   = p;
     data = new ArrayList();
     readFile();
 }
コード例 #29
0
 /// <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();
 }
コード例 #30
0
 public ReCaptchaValidator(ParametersManager parameterManager, IHttpClientFactory httpClientFactory)
 {
     _parameterManager = parameterManager;
     _httpClient       = httpClientFactory.CreateClient();
 }
コード例 #31
0
 public ParametersManagerController(ParametersManager parametersManager, IOptions <IpRateLimitOptions> rateLimitOptions, IIpPolicyStore ipPolicyStore)
 {
     _parametersManager = parametersManager;
     _rateLimitOptions  = rateLimitOptions.Value;
     _ipPolicyStore     = ipPolicyStore;
 }
コード例 #32
0
 public override string FormatQueryPagination(string sql, Pagination page, ParametersManager pm)
 {
     throw new NotSupportedException();
 }
コード例 #33
0
 public BenchmarksManager(ParametersManager parameters)
 {
     _parameters = parameters;
 }