Cake.Kudu.Provider.KuduProvider.KuduProvider C# (CSharp) Метод

KuduProvider() приватный Метод

Initializes a new instance of the KuduProvider class.
private KuduProvider ( ICakeContext context ) : System
context ICakeContext The context.
Результат System
        internal KuduProvider(ICakeContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            var environmenVariables = context.EnvironmentVariables();
            Deployment = new Deployment(environmenVariables);
            WebSite = new WebSite(environmenVariables);
            SCM = new SCM(environmenVariables);
            Tools = new Tools(environmenVariables);
            AppSettings = environmenVariables
                .Where(key => key.Key.StartsWith("APPSETTING_"))
                .ToDictionary(
                    key => string.Concat(key.Key.Skip(11)),
                    value => value.Value
                );
            ConnectionStrings = environmenVariables
                .Where(key => key.Key.StartsWith("SQLAZURECONNSTR_"))
                .ToDictionary(
                    key => string.Concat(key.Key.Skip(16)),
                    value => value.Value
                );
            IsRunningOnKudu = !string.IsNullOrWhiteSpace(WebSite.Name);


            _kuduSyncRunner = new KuduSyncRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools);
        }
    }