Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.MetricsEventManager.HostStarted C# (CSharp) Method

HostStarted() private method

private HostStarted ( ScriptHost scriptHost ) : void
scriptHost ScriptHost
return void
        internal void HostStarted(ScriptHost scriptHost)
        {
            if (scriptHost == null || scriptHost.Functions == null)
            {
                return;
            }

            foreach (var function in scriptHost.Functions)
            {
                if (function == null || function.Metadata == null)
                {
                    continue;
                }

                _eventGenerator.LogFunctionDetailsEvent(
                    appName,
                    GetNormalizedString(function.Name),
                    function.Metadata != null
                        ? SerializeBindings(function.Metadata.InputBindings)
                        : GetNormalizedString(null),
                    function.Metadata != null
                        ? SerializeBindings(function.Metadata.OutputBindings)
                        : GetNormalizedString(null),
                    function.Metadata.ScriptType.ToString(),
                    function.Metadata != null ? function.Metadata.IsDisabled : false);
            }
        }

Usage Example

Esempio n. 1
0
        public void LogEvent(MetricEvent metricEvent)
        {
            HostStarted hostStartedEvent = metricEvent as HostStarted;

            if (hostStartedEvent != null)
            {
                _metricsEventManager.HostStarted(hostStartedEvent.Host);
            }
        }