コード例 #1
0
ファイル: DlnaEventManager.cs プロジェクト: ximliu/jellyfin
        private EventSubscriptionResponse GetEventSubscriptionResponse(string subscriptionId, string requestedTimeoutString, int timeoutSeconds)
        {
            var response = new EventSubscriptionResponse(string.Empty, "text/plain");

            response.Headers["SID"]     = subscriptionId;
            response.Headers["TIMEOUT"] = string.IsNullOrEmpty(requestedTimeoutString) ? ("SECOND-" + timeoutSeconds.ToString(CultureInfo.InvariantCulture)) : requestedTimeoutString;

            return(response);
        }
コード例 #2
0
        private EventSubscriptionResponse GetEventSubscriptionResponse(string subscriptionId, int timeoutSeconds)
        {
            var response = new EventSubscriptionResponse
            {
                Content     = "\r\n",
                ContentType = "text/plain"
            };

            response.Headers["SID"]     = subscriptionId;
            response.Headers["TIMEOUT"] = "SECOND-" + timeoutSeconds.ToString(_usCulture);

            return(response);
        }
コード例 #3
0
ファイル: EventManager.cs プロジェクト: zhuawaren/Emby
        private EventSubscriptionResponse GetEventSubscriptionResponse(string subscriptionId, string requestedTimeoutString, int timeoutSeconds)
        {
            var response = new EventSubscriptionResponse
            {
                Content     = string.Empty,
                ContentType = "text/plain"
            };

            response.Headers["SID"]     = subscriptionId;
            response.Headers["TIMEOUT"] = string.IsNullOrWhiteSpace(requestedTimeoutString) ? ("SECOND-" + timeoutSeconds.ToString(_usCulture)) : requestedTimeoutString;

            return(response);
        }
コード例 #4
0
 private object GetSubscriptionResponse(EventSubscriptionResponse response)
 {
     return(ResultFactory.GetResult(response.Content, response.ContentType, response.Headers));
 }