コード例 #1
0
 /// <summary>
 /// Mark as combat entry and continue sifting
 /// </summary>
 /// <param name="pattern"></param>
 /// <param name="_callback"></param>
 /// <param name="_combat_filter"></param>
 public Filter(string pattern, delegate_callback _callback, Boolean _combat_filter)
 {
     //Compile the regex for faster matches
     regex         = new Regex(pattern, RegexOptions.Compiled);
     callback      = _callback;
     combat_filter = _combat_filter;
 }
コード例 #2
0
ファイル: Http_call.cs プロジェクト: elky84/light-csnet
    public static void relay_start(int guid, delegate_callback callback, bool sync = false)
    {
        if (client == null)
        {
            callback(null);
            return;
        }

        var request = new RestRequest("relay/start", Method.POST);

        request.AddParameter("RoomNumber", "6464");
        request.AddParameter("UserID", guid.ToString());

        client.ExecuteAsync(request, response => {
            Console.WriteLine(response.Content);
            if (response.Content.Length == 0)
            {
                callback(null);
                return;
            }

            JObject obj = JObject.Parse(response.Content);
            callback(obj);
        });
    }
コード例 #3
0
ファイル: Http_call.cs プロジェクト: elky84/light-csnet
    public static void login(string web_address, string user_id, string password, delegate_callback callback, bool sync = false)
    {
        if (client == null)
        {
            client = new RestClient(web_address);
            client.CookieContainer = new System.Net.CookieContainer();
        }

        var request = new RestRequest("login", Method.POST);

        request.AddParameter("UserID", user_id);
        request.AddParameter("Password", password);
        request.AddParameter("Payload", "primus_local_test");

        client.ExecuteAsync(request, response => {
            Console.WriteLine(response.Content);
            if (response.Content.Length == 0)
            {
                callback(null);
                return;
            }

            JObject obj = JObject.Parse(response.Content);
            callback(obj);
        });
    }
コード例 #4
0
 /// <summary>
 /// Mark as combat entry and continue sifting
 /// </summary>
 /// <param name="pattern"></param>
 /// <param name="_callback"></param>
 /// <param name="_combat_filter"></param>
 public Filter(string pattern, delegate_callback _callback, Boolean _combat_filter)
 {
     //Compile the regex for faster matches
     regex = new Regex(pattern, RegexOptions.Compiled);
     callback = _callback;
     combat_filter = _combat_filter;
 }
コード例 #5
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             callback = null;
             regex = null;
         }
     }
     disposed = true;
 }
コード例 #6
0
 /// <summary>
 /// Internal dispose
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     //If system hasn't already disposed
     if (!disposed)
     {
         //And we are disposing
         if (disposing)
         {
             //Kill callback delegates and regex
             callback = null;
             regex    = null;
         }
     }
     disposed = true;
 }
コード例 #7
0
 public classConvertManager()
 {
     list_             = new Dictionary <string, classFLV2MP3Thread>();
     callback_         = null;
     completeCallback_ = null;
 }
コード例 #8
0
 public Filter(string pattern, delegate_callback _callback)
 {
     regex = new Regex(pattern, RegexOptions.Compiled); // Compile the regex for faster matches
     callback = _callback;
     combat_filter = false;
 }
コード例 #9
0
 public classConvertManager()
 {
     list_ = new Dictionary<string, classFLV2MP3Thread>();
     callback_ = null;
     completeCallback_ = null;
 }
コード例 #10
0
 /// <summary>
 /// Internal dispose
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     //If system hasn't already disposed
     if (!disposed)
     {
         //And we are disposing
         if (disposing)
         {
             //Kill callback delegates and regex
             callback = null;
             regex = null;
         }
     }
     disposed = true;
 }