コード例 #1
0
        public async Task <IActionResult> Get()
        {
            var appData = await _applicationDataService.GetApplicationData(Request.HttpContext);

            return(Ok(new
            {
                success = true,
                data = appData
            }));
        }
コード例 #2
0
        private void SaveNewConnectionString(string connectionString)
        {
            var applicationData = _applicationDataService.GetApplicationData();

            if (applicationData.History.Contains(connectionString))
            {
                return;
            }

            var newApplicationData = new ApplicationData(applicationData.History.Append(connectionString));

            _applicationDataService.UpdateApplicationData(newApplicationData);
        }
コード例 #3
0
        public IAutoCompleteStringWithPasswordsCollection GetAutoComplete()
        {
            var collection = new AutoCompleteStringWithPasswordsCollection();

            var connectionStrings = _applicationDataService.GetApplicationData().History;

            foreach (var connectionString in connectionStrings)
            {
                var masked = _passwordHelper.Mask(connectionString);

                while (!collection.TryInsert(masked, connectionString))
                {
                    masked = _passwordHelper.AddGarble(masked);
                }
            }

            return(collection);
        }
コード例 #4
0
        public async Task <IActionResult> Get()
        {
            var appData = await _applicationDataService.GetApplicationData(Request.HttpContext);

            return(Ok(appData));
        }
コード例 #5
0
        public IActionResult Get()
        {
            var appData = _applicationDataService.GetApplicationData(Request.HttpContext, Startup.Configuration["StsAuthority"]);

            return(Ok(appData));
        }