public static THttpDown DoGet(string url, CallBackArg <THttpDown> callback, string contentType) { THttpDown hNHttpDwon = THttpDown.DoGet(url, callback); hNHttpDwon.SetContentType(contentType); return(hNHttpDwon); }
public override bool Equals(object obj) { THttpDown hNHttpDwon = obj as THttpDown; bool flag = hNHttpDwon == null; return(!flag && hNHttpDwon.url.Equals(this.url) && hNHttpDwon.Tag.Equals(this.tag)); }
public static THttpDown DoPost(string url, CallBackArg <THttpDown> callback, string contentType) { THttpDown hNHttpDwon = THttpDown.DoGet(url, callback); hNHttpDwon.SetContentType(contentType); hNHttpDwon.isGet = false; hNHttpDwon.postParameters = new Dictionary <string, string>(); return(hNHttpDwon); }
public static void AddDown(THttpDown down) { string text = down.url; string text2 = down.Tag; bool flag = THttpDown.IsDown(text, text2); if (flag) { Debug.Log(text + "正在下载中,请不 要重复下载!"); } else { THttpDown.LoadingDown.Add(down); } }
public static THttpDown DoGet(string url, CallBackArg <THttpDown> callback) { bool flag = THttpDown.IsDown(url, ""); THttpDown result; if (flag) { Debug.Log(url + "正在下载中,请不 要重复下载!"); result = null; } else { THttpDown hNHttpDwon = new THttpDown(url, callback); THttpDown.AddDown(hNHttpDwon); result = hNHttpDwon; } return(result); }
public static THttpDown GetDown(string urlKey, string tag = "") { THttpDown result; int num; for (int i = 0; i < THttpDown.LoadingDown.Count; i = num + 1) { THttpDown hNHttpDwon = THttpDown.LoadingDown[i]; bool flag = hNHttpDwon == null; if (!flag) { bool flag2 = hNHttpDwon.url == urlKey && hNHttpDwon.Tag == tag; if (flag2) { result = hNHttpDwon; return(result); } } num = i; } result = null; return(result); }