Ejemplo n.º 1
0
        public void Add(IInfoAccumulator accumulator)
        {
            accumulator.Add("diskcache_subfolders", options.Subfolders);
            accumulator.Add("diskcache_autoclean", options.AutoClean);
            accumulator.Add("diskcache_asyncwrites", options.AsyncWrites);

            /*
             * diskcache_virtualpath /imagecache
             * diskcache_drive_total 161059172352
             * diskcache_drive_avail 38921302016
             * diskcache_filesystem NTFS
             * diskcache_network_drive 0
             * diskcache_subfolders 8192
             */
        }
Ejemplo n.º 2
0
 public void Add(IInfoAccumulator q)
 {
     foreach (var s in GetPluginsUsedShorthand())
     {
         q.Add("p", s);
     }
 }
        public void Add(IInfoAccumulator query)
        {
            var q = query.WithPrefix("proc_");

            if (iisVersion != null)
            {
                q.Add("iis", iisVersion);
            }

            q.Add("default_commands", PathHelpers.SerializeCommandString(options.CommandDefaults));

            var a = Assembly.GetAssembly(this.GetType()).GetInformationalVersion();

            if (a.LastIndexOf('+') >= 0)
            {
                q.Add("git_commit", a.Substring(a.LastIndexOf('+') + 1));
            }
            q.Add("info_version", Assembly.GetAssembly(this.GetType()).GetInformationalVersion());
            q.Add("file_version", Assembly.GetAssembly(this.GetType()).GetFileVersion());


            if (env.ContentRootPath != null)
            {
                // ReSharper disable once StringLiteralTypo
                q.Add("apppath_hash", Utilities.Sha256TruncatedBase64(env.ContentRootPath, 6));
            }

            query.Add("imageflow", 1);
            query.AddString("enabled_cache", options.ActiveCacheBackend.ToString());
            if (streamCache != null)
            {
                query.AddString("stream_cache", streamCache.GetType().Name);
            }
            query.Add("map_web_root", options.MapWebRoot);
            query.Add("use_presets_exclusively", options.UsePresetsExclusively);
            query.Add("request_signing_default", options.RequestSignatureOptions?.DefaultRequirement.ToString() ?? "never");
            query.Add("default_cache_control", options.DefaultCacheControlString);

            foreach (var s in pluginNames)
            {
                query.Add("p", s);
            }
            foreach (var p in infoProviders)
            {
                p?.Add(query);
            }
        }
Ejemplo n.º 4
0
        public void Add(IInfoAccumulator query)
        {
            var q = query.WithPrefix("proc_");

            q.Add("64", Process64Bit);
            q.Add("guid", ProcessGuid);
            q.Add("sys_dotnet", DotNetVersionInstalled);
            q.Add("iis", IisVer);
            q.Add("integrated_pipeline", IntegratedPipeline);
            q.Add("id_hash", Utilities.Sha256TruncatedBase64(ProcessId.ToString(), 6));

            q.Add("asyncmodule", Config.Current.Pipeline.UsingAsyncMode);
            q.Add("default_commands", Config.Current.get("pipeline.defaultCommands", null));
            q.Add("working_set_mb", Environment.WorkingSet / 1000000);
            q.Add("git_commit", Assembly.GetAssembly(this.GetType()).GetShortCommit());
            q.Add("info_version", Assembly.GetAssembly(this.GetType()).GetInformationalVersion());
            q.Add("file_version", Assembly.GetAssembly(this.GetType()).GetFileVersion());

            if (HostingEnvironment.ApplicationPhysicalPath != null)
            {
                q.Add("apppath_hash", Utilities.Sha256TruncatedBase64(HostingEnvironment.ApplicationPhysicalPath, 6));
            }

            // Add HttpModule class names without prefixing
            SetModules(HttpContext.Current?.ApplicationInstance?.Modules);
            if (HttpModules != null)
            {
                foreach (var name in HttpModules)
                {
                    query.Add("mod", name);
                }
            }



            // TODO: check for mismatched assemblies?
        }