internal static Collection <CustomAttributeBuilder> CreateTypeAttributes(ScriptJobHostOptions scriptConfig)
        {
            Collection <CustomAttributeBuilder> customAttributes = new Collection <CustomAttributeBuilder>();

            // apply the timeout settings to our type
            if (scriptConfig.FunctionTimeout != null)
            {
                var timeoutBuilder = CustomAttributeBuilderUtility.GetTimeoutCustomAttributeBuilder(scriptConfig.FunctionTimeout.Value);
                customAttributes.Add(timeoutBuilder);
            }

            return(customAttributes);
        }
        internal static Collection <CustomAttributeBuilder> CreateTypeAttributes(ScriptJobHostOptions scriptConfig)
        {
            Collection <CustomAttributeBuilder> customAttributes = new Collection <CustomAttributeBuilder>();

            // apply the timeout settings to our type
            if (scriptConfig.FunctionTimeout != null)
            {
                var timeoutBuilder = CustomAttributeBuilderUtility.GetTimeoutCustomAttributeBuilder(scriptConfig.FunctionTimeout.Value);
                customAttributes.Add(timeoutBuilder);
            }
            // apply retry settings for function execution
            if (scriptConfig.Retry != null)
            {
                // apply the retry settings from host.json
                var retryCustomAttributeBuilder = CustomAttributeBuilderUtility.GetRetryCustomAttributeBuilder(scriptConfig.Retry);
                if (retryCustomAttributeBuilder != null)
                {
                    customAttributes.Add(retryCustomAttributeBuilder);
                }
            }

            return(customAttributes);
        }