ServiceStack.HttpResult.TriggerEvent C# (CSharp) Method

TriggerEvent() public static method

Decorate the response with an additional client-side event to instruct participating smart clients (e.g. ajax) with hints to transparently invoke client-side functionality
public static TriggerEvent ( object response, string eventName, string value = null ) : HttpResult
response object
eventName string
value string
return HttpResult
        public static HttpResult TriggerEvent(object response, string eventName, string value = null)
        {
            return new HttpResult(response)
            {
                Headers =
                {
                    { HttpHeaders.XTrigger, eventName + (value != null ? ":" + value : "") },
                }
            };
        }