コード例 #1
0
ファイル: ServerState.cs プロジェクト: HITSUN2015/duplicati
        public void GET(string key, RequestInfo info)
        {
            bool isError;
            long id = 0;
            long.TryParse(key, out id);

            if (info.LongPollCheck(Program.StatusEventNotifyer, ref id, out isError))
            {
                //Make sure we do not report a higher number than the eventnotifyer says
                var st = new Serializable.ServerStatus();
                st.LastEventID = id;
                info.OutputOK(st);
            }
            else if (!isError)
            {
                info.OutputOK(new Serializable.ServerStatus());
            }
        }
コード例 #2
0
ファイル: ServerState.cs プロジェクト: kevinv12/test
        public void GET(string key, RequestInfo info)
        {
            bool isError;
            long id = 0;

            long.TryParse(key, out id);

            if (info.LongPollCheck(Program.StatusEventNotifyer, ref id, out isError))
            {
                //Make sure we do not report a higher number than the eventnotifyer says
                var st = new Serializable.ServerStatus();
                st.LastEventID = id;
                info.OutputOK(st);
            }
            else if (!isError)
            {
                info.OutputOK(new Serializable.ServerStatus());
            }
        }
コード例 #3
0
ファイル: ServerState.cs プロジェクト: videocrap/duplicati
 public class ServerState : IRESTMethodGET, IRESTMethodPOST, IRESTMethodDocumented
コード例 #4
0
ファイル: ControlHandler.cs プロジェクト: admz/duplicati
 private void GetCurrentState (HttpServer.IHttpRequest request, HttpServer.IHttpResponse response, HttpServer.Sessions.IHttpSession session, BodyWriter bw)
 {
     bool isError;
     long id = 0;
     if (LongPollCheck(request, response, bw, Program.StatusEventNotifyer, ref id, out isError))
     {
         //Make sure we do not report a higher number than the eventnotifyer says
         var st = new Serializable.ServerStatus();
         st.LastEventID = id;
         bw.OutputOK(st);
     }
     else if (!isError)
     {
         bw.OutputOK(new Serializable.ServerStatus());
     }
 }
コード例 #5
0
ファイル: ServerState.cs プロジェクト: Torgalide/duplicati
 public class ServerState : IRESTMethodGET, IRESTMethodPOST, IRESTMethodDocumented