📄 wappush.cs
字号:
if (DateTime.Compare(value, DateTime.MinValue) == 0)
{
this.k = value;
}
else if (Information.IsDate(value))
{
this.k = value;
}
else
{
this.l.a(0x1b5dL, "Invalid create date value", "WAPPUSH");
this.k = new DateTime();
}
this.a();
}
}
public string mCore.IWapPush.Destination
{
get
{
this.l.av();
return this.h;
}
set
{
this.l.av();
if (value == null)
{
value = "";
}
this.h = value.Trim();
if ((this.h.Length == 0) | (!this.l.j(this.h) & !this.l.f(this.h)))
{
this.l.a(0x1b59L, "Invalid destination mobile number", "WAPPUSH");
this.h = "";
}
this.a();
}
}
public string mCore.IWapPush.Expiry
{
get
{
this.l.av();
return this.i;
}
set
{
string str = "";
long num = 0L;
bool flag = true;
try
{
this.l.av();
if (value == null)
{
value = "0";
}
if (value.Trim() == "0")
{
this.i = "0";
}
else
{
if (value.Length >= 2)
{
str = value.Substring(value.Length - 1, 1).ToUpper();
if ((Versioned.IsNumeric(value.Substring(0, value.Length - 1)) & !value.Contains(",")) & !value.Contains("."))
{
num = Conversions.ToLong(value.Substring(0, value.Length - 1));
}
else
{
this.i = "0";
flag = false;
}
}
else
{
this.i = "0";
flag = false;
}
if ((num == 0L) & (((str == "H") | (str == "D")) | (str == "M")))
{
this.i = "0";
}
else if ((((str == "H") | (str == "D")) | (str == "M")) & (num > 0L))
{
if (((((str == "H") & (num <= 0x18L)) & (num >= 1L)) | (((str == "D") & (num <= 0x1fL)) & (num >= 1L))) | (((str == "M") & (num <= 12L)) & (num >= 1L)))
{
this.i = value.ToUpper();
}
else
{
this.i = "0";
flag = false;
}
}
else
{
this.i = "0";
flag = false;
}
if (!flag)
{
this.i = "0";
this.l.a(0x1b5eL, "Invalid expiry time", "WAPPUSH");
}
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.m.r.b("[WapPush:Expiry:1] " + exception.Message);
ProjectData.ClearProjectError();
}
this.a();
}
}
public bool mCore.IWapPush.IsLengthOK
{
get
{
bool flag;
string str = "";
string str2 = "";
string str3 = "";
try
{
flag = false;
str = this.l.a(this.f, this.g, this.k, this.i, this.j);
str2 = this.l.am();
str3 = this.l.aw();
if (((int) Math.Round((double) (((double) (str + str2 + str3).Length) / 2.0))) <= 140)
{
flag = true;
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.m.r.b("[WapPush:IsLengthOK:1] " + exception.Message);
ProjectData.ClearProjectError();
}
return flag;
}
}
public string mCore.IWapPush.Text
{
get
{
this.l.av();
return this.f;
}
set
{
this.l.av();
if (value == null)
{
value = "";
}
this.f = value;
if (value.Length <= 0)
{
this.l.a(0x1b5aL, "Text message cannot be zero length", "WAPPUSH");
this.f = "";
}
this.a();
}
}
public string mCore.IWapPush.URL
{
get
{
this.l.av();
return this.g;
}
set
{
this.l.av();
if (value == null)
{
value = "";
}
this.g = value.Trim();
if (value.Length <= 0)
{
this.l.a(0x1b5bL, "Push URL cannot be zero length", "WAPPUSH");
this.g = "";
}
this.a();
}
}
public string Text
{
get
{
this.l.av();
return this.f;
}
set
{
this.l.av();
if (value == null)
{
value = "";
}
this.f = value;
if (value.Length <= 0)
{
this.l.a(0x1b5aL, "Text message cannot be zero length", "WAPPUSH");
this.f = "";
}
this.a();
}
}
public string URL
{
get
{
this.l.av();
return this.g;
}
set
{
this.l.av();
if (value == null)
{
value = "";
}
this.g = value.Trim();
if (value.Length <= 0)
{
this.l.a(0x1b5bL, "Push URL cannot be zero length", "WAPPUSH");
this.g = "";
}
this.a();
}
}
private class a
{
private string a = "";
private string b = "";
private string c = "";
private string d = "0";
private string e = "";
private int f;
private DateTime g = new DateTime();
private f h;
private SMS i;
internal bool j = false;
internal int k;
internal string l = "";
internal string m = "";
internal bool n = false;
internal a(ref SMS A_0, string A_1, string A_2, string A_3, string A_4, string A_5, DateTime A_6, int A_7, bool A_8)
{
this.i = A_0;
this.h = this.i.gm;
this.a = A_1;
this.b = A_2;
this.c = A_3;
this.d = A_4;
this.e = A_5;
this.g = A_6;
this.f = A_7;
this.n = A_8;
}
internal void a()
{
if (Monitor.TryEnter(this.h, this.h.@as))
{
string str = "";
bool flag = false;
try
{
this.h.av();
if (!this.h.af)
{
this.i.q.a(true);
}
if (this.h.ah == this.h.b9)
{
this.h.a(0x1b5fL, this.h.l("odumu5VOg_:5-26cCP/GtqPa6g$"), "WAPPUSH");
this.j = false;
}
else
{
if (((this.a.Length != 0) & (this.b.Length != 0)) & (this.c.Length != 0))
{
str = this.h.a(this.c, this.a, this.b, this.g, this.d, this.e, this.f, this.n);
if (str.Trim().Length <= 0)
{
if ((this.h.b0 == 0L) && (this.h.z == 0L))
{
this.h.b0 = 0x1b60L;
this.h.bz = "WAP push send error";
}
if (this.h.b0 > 0L)
{
this.h.a(this.h.b0, this.h.bz, "WAPPUSH");
}
}
else
{
flag = true;
}
}
else if (this.a.Length <= 0)
{
this.h.a(0x1b61L, "Text message not specified", "WAPPUSH");
}
else if (this.b.Length <= 0)
{
this.h.a(0x1b62L, "Push URL not specified", "WAPPUSH");
}
else if (this.c.Length <= 0)
{
this.h.a(0x1b63L, "Destination mobile not specified", "WAPPUSH");
}
this.j = flag;
this.l = str;
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.i.r.b("[WapPush:Send_Class:Send:1] " + exception.Message);
ProjectData.ClearProjectError();
}
finally
{
Monitor.Exit(this.h);
}
}
else
{
this.h.a(0x2333L, "Thread monitor enter attempt timeout [WapPush:Send_Class:Send:A]", "WAPPUSH");
this.j = false;
}
}
internal void b()
{
try
{
this.h.av();
if (!this.h.af)
{
this.i.q.a(true);
}
if (this.h.ah == this.h.b9)
{
this.h.a(0x1b5fL, this.h.l("odumu5VOg_:5-26cCP/GtqPa6g$"), "WAPPUSH");
}
else if (((this.a.Length != 0) & (this.b.Length != 0)) & (this.c.Length != 0))
{
this.m = this.i.objQueue.a(this.c, this.a, this.b, this.g, this.d, this.e, this.k, this.f, this.n);
}
else if (this.a.Length <= 0)
{
this.h.a(0x1b61L, "Text message not specified", "WAPPUSH");
}
else if (this.b.Length <= 0)
{
this.h.a(0x1b62L, "Push URL not specified", "WAPPUSH");
}
else if (this.c.Length <= 0)
{
this.h.a(0x1b63L, "Destination mobile not specified", "WAPPUSH");
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
Exception exception = exception1;
this.i.r.b("[WapPush:Send_Class:SendQ:1] " + exception.Message);
ProjectData.ClearProjectError();
}
}
}
[Obsolete("mCore.WapPush.EnumAction enumerator was obsoleted in version 1.1. Use mCore.WapPushAction instead", true)]
public enum EnumAction
{
SignalHigh = 3,
SignalLow = 1,
SignalMedium = 2
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -