| using System; |
| using System; |
| using System.Collections.Generic; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Linq; |
| using System.Text.RegularExpressions; |
| using System.Text.RegularExpressions; |
| using System.Xml; |
| using System.Xml; |
| using ZionRobot.Helpers; |
| using ZionRobot.Helpers; |
| |
| |
| namespace ZionRobot.Models.Source |
| namespace ZionRobot.Models.Source |
| { |
| { |
| // Token: 0x0200002B RID: 43 |
| // Token: 0x02000021 RID: 33 |
| public class Action |
| public class Action |
| { |
| { |
| // Token: 0x17000066 RID: 102 |
| // Token: 0x17000043 RID: 67 |
| // (get) Token: 0x0600010F RID: 271 RVA: 0x00007412 File Offset: 0x00005612 |
| // (get) Token: 0x060000C0 RID: 192 RVA: 0x00005EEE File Offset: 0x000040EE |
| // (set) Token: 0x06000110 RID: 272 RVA: 0x0000741A File Offset: 0x0000561A |
| // (set) Token: 0x060000C1 RID: 193 RVA: 0x00005EF6 File Offset: 0x000040F6 |
| public string Name { get; set; } |
| public string Name { get; set; } |
| |
| |
| // Token: 0x17000067 RID: 103 |
| // Token: 0x17000044 RID: 68 |
| // (get) Token: 0x06000111 RID: 273 RVA: 0x00007423 File Offset: 0x00005623 |
| // (get) Token: 0x060000C2 RID: 194 RVA: 0x00005EFF File Offset: 0x000040FF |
| // (set) Token: 0x06000112 RID: 274 RVA: 0x0000742B File Offset: 0x0000562B |
| // (set) Token: 0x060000C3 RID: 195 RVA: 0x00005F07 File Offset: 0x00004107 |
| public string Type { get; set; } |
| public string Type { get; set; } |
| |
| |
| // Token: 0x17000068 RID: 104 |
| // Token: 0x17000045 RID: 69 |
| // (get) Token: 0x06000113 RID: 275 RVA: 0x00007434 File Offset: 0x00005634 |
| // (get) Token: 0x060000C4 RID: 196 RVA: 0x00005F10 File Offset: 0x00004110 |
| // (set) Token: 0x06000114 RID: 276 RVA: 0x0000743C File Offset: 0x0000563C |
| // (set) Token: 0x060000C5 RID: 197 RVA: 0x00005F18 File Offset: 0x00004118 |
| public string Check { get; set; } |
| public string Check { get; set; } |
| |
| |
| // Token: 0x17000069 RID: 105 |
| // Token: 0x17000046 RID: 70 |
| // (get) Token: 0x06000115 RID: 277 RVA: 0x00007445 File Offset: 0x00005645 |
| // (get) Token: 0x060000C6 RID: 198 RVA: 0x00005F21 File Offset: 0x00004121 |
| // (set) Token: 0x06000116 RID: 278 RVA: 0x0000744D File Offset: 0x0000564D |
| // (set) Token: 0x060000C7 RID: 199 RVA: 0x00005F29 File Offset: 0x00004129 |
| public string Regex { get; set; } |
| public string Regex { get; set; } |
| |
| |
| // Token: 0x1700006A RID: 106 |
| // Token: 0x17000047 RID: 71 |
| // (get) Token: 0x06000117 RID: 279 RVA: 0x00007456 File Offset: 0x00005656 |
| // (get) Token: 0x060000C8 RID: 200 RVA: 0x00005F32 File Offset: 0x00004132 |
| // (set) Token: 0x06000118 RID: 280 RVA: 0x0000745E File Offset: 0x0000565E |
| // (set) Token: 0x060000C9 RID: 201 RVA: 0x00005F3A File Offset: 0x0000413A |
| public string Replace { get; set; } |
| public string Replace { get; set; } |
| |
| |
| // Token: 0x1700006B RID: 107 |
| // Token: 0x17000048 RID: 72 |
| // (get) Token: 0x06000119 RID: 281 RVA: 0x00007467 File Offset: 0x00005667 |
| // (get) Token: 0x060000CA RID: 202 RVA: 0x00005F43 File Offset: 0x00004143 |
| // (set) Token: 0x0600011A RID: 282 RVA: 0x0000746F File Offset: 0x0000566F |
| // (set) Token: 0x060000CB RID: 203 RVA: 0x00005F4B File Offset: 0x0000414B |
| public string Attribute { get; set; } |
| public string Attribute { get; set; } |
| |
| |
| // Token: 0x1700006C RID: 108 |
| // Token: 0x17000049 RID: 73 |
| // (get) Token: 0x0600011B RID: 283 RVA: 0x00007478 File Offset: 0x00005678 |
| // (get) Token: 0x060000CC RID: 204 RVA: 0x00005F54 File Offset: 0x00004154 |
| // (set) Token: 0x0600011C RID: 284 RVA: 0x00007480 File Offset: 0x00005680 |
| // (set) Token: 0x060000CD RID: 205 RVA: 0x00005F5C File Offset: 0x0000415C |
| public int MaxLength { get; set; } |
| public int MaxLength { get; set; } |
| |
| |
| // Token: 0x1700006D RID: 109 |
| // Token: 0x1700004A RID: 74 |
| // (get) Token: 0x0600011D RID: 285 RVA: 0x00007489 File Offset: 0x00005689 |
| // (get) Token: 0x060000CE RID: 206 RVA: 0x00005F65 File Offset: 0x00004165 |
| // (set) Token: 0x0600011E RID: 286 RVA: 0x00007491 File Offset: 0x00005691 |
| // (set) Token: 0x060000CF RID: 207 RVA: 0x00005F6D File Offset: 0x0000416D |
| public int Index { get; set; } |
| public int Index { get; set; } |
| |
| |
| // Token: 0x1700006E RID: 110 |
| // Token: 0x1700004B RID: 75 |
| // (get) Token: 0x0600011F RID: 287 RVA: 0x0000749A File Offset: 0x0000569A |
| // (get) Token: 0x060000D0 RID: 208 RVA: 0x00005F76 File Offset: 0x00004176 |
| // (set) Token: 0x06000120 RID: 288 RVA: 0x000074A2 File Offset: 0x000056A2 |
| // (set) Token: 0x060000D1 RID: 209 RVA: 0x00005F7E File Offset: 0x0000417E |
. | public bool Wait { get; set; } |
| |
| |
| |
| // Token: 0x1700006F RID: 111 |
| |
| // (get) Token: 0x06000121 RID: 289 RVA: 0x000074AB File Offset: 0x000056AB |
| |
| // (set) Token: 0x06000122 RID: 290 RVA: 0x000074B3 File Offset: 0x000056B3 |
| |
| public bool Initialize { get; set; } |
| public bool Initialize { get; set; } |
| |
| |
| // Token: 0x17000070 RID: 112 |
| // Token: 0x1700004C RID: 76 |
| // (get) Token: 0x06000123 RID: 291 RVA: 0x000074BC File Offset: 0x000056BC |
| // (get) Token: 0x060000D2 RID: 210 RVA: 0x00005F87 File Offset: 0x00004187 |
| // (set) Token: 0x06000124 RID: 292 RVA: 0x000074C4 File Offset: 0x000056C4 |
| // (set) Token: 0x060000D3 RID: 211 RVA: 0x00005F8F File Offset: 0x0000418F |
| public List<Action> InnerActions { get; set; } |
| public List<Action> InnerActions { get; set; } |
| |
| |
| // Token: 0x17000071 RID: 113 |
| // Token: 0x1700004D RID: 77 |
| // (get) Token: 0x06000125 RID: 293 RVA: 0x000074CD File Offset: 0x000056CD |
| // (get) Token: 0x060000D4 RID: 212 RVA: 0x00005F98 File Offset: 0x00004198 |
| // (set) Token: 0x06000126 RID: 294 RVA: 0x000074D5 File Offset: 0x000056D5 |
| // (set) Token: 0x060000D5 RID: 213 RVA: 0x00005FA0 File Offset: 0x000041A0 |
| public List<Action> ResultTrue { get; set; } |
| public List<Action> ResultTrue { get; set; } |
| |
| |
| // Token: 0x17000072 RID: 114 |
| // Token: 0x1700004E RID: 78 |
| // (get) Token: 0x06000127 RID: 295 RVA: 0x000074DE File Offset: 0x000056DE |
| // (get) Token: 0x060000D6 RID: 214 RVA: 0x00005FA9 File Offset: 0x000041A9 |
| // (set) Token: 0x06000128 RID: 296 RVA: 0x000074E6 File Offset: 0x000056E6 |
| // (set) Token: 0x060000D7 RID: 215 RVA: 0x00005FB1 File Offset: 0x000041B1 |
| public List<Action> ResultFalse { get; set; } |
| public List<Action> ResultFalse { get; set; } |
| |
| |
| // Token: 0x17000073 RID: 115 |
| // Token: 0x1700004F RID: 79 |
| // (get) Token: 0x06000129 RID: 297 RVA: 0x000074EF File Offset: 0x000056EF |
| // (get) Token: 0x060000D8 RID: 216 RVA: 0x00005FBA File Offset: 0x000041BA |
| // (set) Token: 0x0600012A RID: 298 RVA: 0x000074F7 File Offset: 0x000056F7 |
| // (set) Token: 0x060000D9 RID: 217 RVA: 0x00005FC2 File Offset: 0x000041C2 |
| public string Where |
| public string Where |
| { |
| { |
| get |
| get |
| { |
| { |
| return this.where; |
| return this.where; |
| } |
| } |
| set |
| set |
| { |
| { |
| this.where = value; |
| this.where = value; |
| } |
| } |
| } |
| } |
| |
| |
| // Token: 0x17000074 RID: 116 |
| // Token: 0x17000050 RID: 80 |
| // (get) Token: 0x0600012B RID: 299 RVA: 0x00007500 File Offset: 0x00005700 |
| // (get) Token: 0x060000DA RID: 218 RVA: 0x00005FCB File Offset: 0x000041CB |
| // (set) Token: 0x0600012C RID: 300 RVA: 0x00007508 File Offset: 0x00005708 |
| // (set) Token: 0x060000DB RID: 219 RVA: 0x00005FD3 File Offset: 0x000041D3 |
| public string Value |
| public string Value |
| { |
| { |
| get |
| get |
| { |
| { |
| return this.value; |
| return this.value; |
| } |
| } |
| set |
| set |
| { |
| { |
| this.value = value; |
| this.value = value; |
| } |
| } |
| } |
| } |
| |
| |
| // Token: 0x0600012D RID: 301 RVA: 0x00007511 File Offset: 0x00005711 |
| // Token: 0x060000DC RID: 220 RVA: 0x00005FDC File Offset: 0x000041DC |
| public Action() |
| public Action() |
| { |
| { |
| this.Initialize = true; |
| this.Initialize = true; |
| } |
| } |
| |
| |
| // Token: 0x0600012E RID: 302 RVA: 0x00007524 File Offset: 0x00005724 |
| // Token: 0x060000DD RID: 221 RVA: 0x00005FF0 File Offset: 0x000041F0 |
| public Action(XmlNode node) |
| public Action(XmlNode node) |
| { |
| { |
| try |
| try |
| { |
| { |
| XmlAttribute xmlAttribute = node.Attributes["Name"]; |
| XmlAttribute xmlAttribute = node.Attributes["Name"]; |
| this.Name = (((xmlAttribute != null) ? xmlAttribute.Value : null) ?? null); |
| this.Name = (((xmlAttribute != null) ? xmlAttribute.Value : null) ?? null); |
| XmlAttribute xmlAttribute2 = node.Attributes["Type"]; |
| XmlAttribute xmlAttribute2 = node.Attributes["Type"]; |
| this.Type = (((xmlAttribute2 != null) ? xmlAttribute2.Value : null) ?? null); |
| this.Type = (((xmlAttribute2 != null) ? xmlAttribute2.Value : null) ?? null); |
| XmlAttribute xmlAttribute3 = node.Attributes["Where"]; |
| XmlAttribute xmlAttribute3 = node.Attributes["Where"]; |
| this.Where = (((xmlAttribute3 != null) ? xmlAttribute3.Value : null) ?? null); |
| this.Where = (((xmlAttribute3 != null) ? xmlAttribute3.Value : null) ?? null); |
| XmlAttribute xmlAttribute4 = node.Attributes["Check"]; |
| XmlAttribute xmlAttribute4 = node.Attributes["Check"]; |
| this.Check = (((xmlAttribute4 != null) ? xmlAttribute4.Value : null) ?? null); |
| this.Check = (((xmlAttribute4 != null) ? xmlAttribute4.Value : null) ?? null); |
| XmlAttribute xmlAttribute5 = node.Attributes["Regex"]; |
| XmlAttribute xmlAttribute5 = node.Attributes["Regex"]; |
| this.Regex = (((xmlAttribute5 != null) ? xmlAttribute5.Value : null) ?? null); |
| this.Regex = (((xmlAttribute5 != null) ? xmlAttribute5.Value : null) ?? null); |
| XmlAttribute xmlAttribute6 = node.Attributes["Replace"]; |
| XmlAttribute xmlAttribute6 = node.Attributes["Replace"]; |
| this.Replace = (((xmlAttribute6 != null) ? xmlAttribute6.Value : null) ?? null); |
| this.Replace = (((xmlAttribute6 != null) ? xmlAttribute6.Value : null) ?? null); |
| XmlAttribute xmlAttribute7 = node.Attributes["Attribute"]; |
| XmlAttribute xmlAttribute7 = node.Attributes["Attribute"]; |
| this.Attribute = (((xmlAttribute7 != null) ? xmlAttribute7.Value : null) ?? null); |
| this.Attribute = (((xmlAttribute7 != null) ? xmlAttribute7.Value : null) ?? null); |
| int maxLength; |
| int maxLength; |
| if (node.Attributes["MaxLength"] == null) |
| if (node.Attributes["MaxLength"] == null) |
| { |
| { |
| maxLength = 0; |
| maxLength = 0; |
| } |
| } |
| else |
| else |
| { |
| { |
| XmlAttribute xmlAttribute8 = node.Attributes["MaxLength"]; |
| XmlAttribute xmlAttribute8 = node.Attributes["MaxLength"]; |
| maxLength = int.Parse((xmlAttribute8 != null) ? xmlAttribute8.Value : null); |
| maxLength = int.Parse((xmlAttribute8 != null) ? xmlAttribute8.Value : null); |
| } |
| } |
| this.MaxLength = maxLength; |
| this.MaxLength = maxLength; |
| XmlAttribute xmlAttribute9 = node.Attributes["Value"]; |
| XmlAttribute xmlAttribute9 = node.Attributes["Value"]; |
| this.Value = (((xmlAttribute9 != null) ? xmlAttribute9.Value.Replace("&", "&") : null) ?? null); |
| this.Value = (((xmlAttribute9 != null) ? xmlAttribute9.Value.Replace("&", "&") : null) ?? null); |
| this.Index = ((node.Attributes["Index"] != null) ? int.Parse(node.Attributes["Index"].Value) : -1); |
| this.Index = ((node.Attributes["Index"] != null) ? int.Parse(node.Attributes["Index"].Value) : -1); |
. | this.Wait = (node.Attributes["Wait"] == null || bool.Parse(node.Attributes["Wait"].Value)); |
| |
| this.InnerActions = new List<Action>(); |
| this.InnerActions = new List<Action>(); |
| foreach (object obj in node.SelectNodes("Action")) |
| foreach (object obj in node.SelectNodes("Action")) |
| { |
| { |
| XmlNode i = (XmlNode)obj; |
| XmlNode i = (XmlNode)obj; |
| this.InnerActions.Add(new Action(i)); |
| this.InnerActions.Add(new Action(i)); |
| } |
| } |
| this.ResultTrue = new List<Action>(); |
| this.ResultTrue = new List<Action>(); |
| foreach (object obj2 in node.SelectNodes("ResultTrue/Action")) |
| foreach (object obj2 in node.SelectNodes("ResultTrue/Action")) |
| { |
| { |
| XmlNode action = (XmlNode)obj2; |
| XmlNode action = (XmlNode)obj2; |
| this.ResultTrue.Add(new Action(action)); |
| this.ResultTrue.Add(new Action(action)); |
| } |
| } |
| this.ResultFalse = new List<Action>(); |
| this.ResultFalse = new List<Action>(); |
| foreach (object obj3 in node.SelectNodes("ResultFalse/Action")) |
| foreach (object obj3 in node.SelectNodes("ResultFalse/Action")) |
| { |
| { |
| XmlNode action2 = (XmlNode)obj3; |
| XmlNode action2 = (XmlNode)obj3; |
| this.ResultFalse.Add(new Action(action2)); |
| this.ResultFalse.Add(new Action(action2)); |
| } |
| } |
| } |
| } |
| catch (Exception ex) |
| catch (Exception ex) |
| { |
| { |
| throw new Exception(ex.Message); |
| throw new Exception(ex.Message); |
| } |
| } |
| } |
| } |
| |
| |
| // Token: 0x0600012F RID: 303 RVA: 0x000078C8 File Offset: 0x00005AC8 |
| // Token: 0x060000DE RID: 222 RVA: 0x0000635C File Offset: 0x0000455C |
| public XmlElement AppendTo(XmlDocument doc) |
| public XmlElement AppendTo(XmlDocument doc) |
| { |
| { |
| XmlElement root = doc.CreateElement("Action"); |
| XmlElement root = doc.CreateElement("Action"); |
| bool flag = this.Name != null; |
| bool flag = this.Name != null; |
| if (flag) |
| if (flag) |
| { |
| { |
| root.SetAttribute("Name", this.Name); |
| root.SetAttribute("Name", this.Name); |
| } |
| } |
| bool flag2 = this.Type != null; |
| bool flag2 = this.Type != null; |
| if (flag2) |
| if (flag2) |
| { |
| { |
| root.SetAttribute("Type", this.Type); |
| root.SetAttribute("Type", this.Type); |
| } |
| } |
| bool flag3 = this.Where != null; |
| bool flag3 = this.Where != null; |
| if (flag3) |
| if (flag3) |
| { |
| { |
| root.SetAttribute("Where", this.Where); |
| root.SetAttribute("Where", this.Where); |
| } |
| } |
| bool flag4 = this.Check != null; |
| bool flag4 = this.Check != null; |
| if (flag4) |
| if (flag4) |
| { |
| { |
| root.SetAttribute("Check", this.Check); |
| root.SetAttribute("Check", this.Check); |
| } |
| } |
| bool flag5 = this.Regex != null; |
| bool flag5 = this.Regex != null; |
| if (flag5) |
| if (flag5) |
| { |
| { |
| root.SetAttribute("Regex", this.Regex); |
| root.SetAttribute("Regex", this.Regex); |
| } |
| } |
| bool flag6 = this.Replace != null; |
| bool flag6 = this.Replace != null; |
| if (flag6) |
| if (flag6) |
| { |
| { |
| root.SetAttribute("Replace", this.Replace); |
| root.SetAttribute("Replace", this.Replace); |
| } |
| } |
| bool flag7 = this.Attribute != null; |
| bool flag7 = this.Attribute != null; |
| if (flag7) |
| if (flag7) |
| { |
| { |
| root.SetAttribute("Attribute", this.Attribute); |
| root.SetAttribute("Attribute", this.Attribute); |
| } |
| } |
| bool flag8 = this.Value != null; |
| bool flag8 = this.Value != null; |
| if (flag8) |
| if (flag8) |
| { |
| { |
| root.SetAttribute("Value", this.Value); |
| root.SetAttribute("Value", this.Value); |
| } |
| } |
| bool flag9 = this.MaxLength > 0; |
| bool flag9 = this.MaxLength > 0; |
| if (flag9) |
| if (flag9) |
| { |
| { |
| root.SetAttribute("MaxLength", this.MaxLength.ToString()); |
| root.SetAttribute("MaxLength", this.MaxLength.ToString()); |
| } |
| } |
. | bool flag10 = !this.Wait; |
| bool flag10 = this.Index >= 0; |
| if (flag10) |
| if (flag10) |
| { |
| { |
. | root.SetAttribute("Wait", this.Wait.ToString()); |
| |
| } |
| |
| bool flag11 = this.Index >= 0; |
| |
| if (flag11) |
| |
| { |
| |
| root.SetAttribute("Index", this.Index.ToString()); |
| root.SetAttribute("Index", this.Index.ToString()); |
| } |
| } |
. | bool flag12 = this.InnerActions.Count > 0; |
| bool flag11 = this.InnerActions.Count > 0; |
| if (flag12) |
| if (flag11) |
| { |
| { |
| XmlElement eLoop = doc.CreateElement("Loop"); |
| XmlElement eLoop = doc.CreateElement("Loop"); |
| this.InnerActions.ForEach(delegate(Action innerAction) |
| this.InnerActions.ForEach(delegate(Action innerAction) |
| { |
| { |
| eLoop.AppendChild(innerAction.AppendTo(doc)); |
| eLoop.AppendChild(innerAction.AppendTo(doc)); |
| }); |
| }); |
| root.AppendChild(eLoop); |
| root.AppendChild(eLoop); |
| } |
| } |
. | bool flag13 = this.ResultTrue.Count > 0; |
| bool flag12 = this.ResultTrue.Count > 0; |
| if (flag13) |
| if (flag12) |
| { |
| { |
| XmlElement resultTrue = doc.CreateElement("ResultTrue"); |
| XmlElement resultTrue = doc.CreateElement("ResultTrue"); |
| this.InnerActions.ForEach(delegate(Action innerAction) |
| this.InnerActions.ForEach(delegate(Action innerAction) |
| { |
| { |
| resultTrue.AppendChild(innerAction.AppendTo(doc)); |
| resultTrue.AppendChild(innerAction.AppendTo(doc)); |
| }); |
| }); |
| root.AppendChild(resultTrue); |
| root.AppendChild(resultTrue); |
| } |
| } |
. | bool flag14 = this.ResultFalse.Count > 0; |
| bool flag13 = this.ResultFalse.Count > 0; |
| if (flag14) |
| if (flag13) |
| { |
| { |
| XmlElement resultFalse = doc.CreateElement("ResultFalse"); |
| XmlElement resultFalse = doc.CreateElement("ResultFalse"); |
| this.InnerActions.ForEach(delegate(Action innerAction) |
| this.InnerActions.ForEach(delegate(Action innerAction) |
| { |
| { |
| resultFalse.AppendChild(innerAction.AppendTo(doc)); |
| resultFalse.AppendChild(innerAction.AppendTo(doc)); |
| }); |
| }); |
| root.AppendChild(resultFalse); |
| root.AppendChild(resultFalse); |
| } |
| } |
| return root; |
| return root; |
| } |
| } |
| |
| |
| // Token: 0x06000130 RID: 304 RVA: 0x00007BBC File Offset: 0x00005DBC |
| // Token: 0x060000DF RID: 223 RVA: 0x00006628 File Offset: 0x00004828 |
| public string ReplaceWithDictionary(string value, Dictionary<string, string> dictionaryValues) |
| public string ReplaceWithDictionary(string value, Dictionary<string, string> dictionaryValues) |
| { |
| { |
| string result = value; |
| string result = value; |
| List<string> parts = (from Match m in System.Text.RegularExpressions.Regex.Matches(value, "\\{[^\\}]*\\}") |
| List<string> parts = (from Match m in System.Text.RegularExpressions.Regex.Matches(value, "\\{[^\\}]*\\}") |
| select m.Value).ToList<string>(); |
| select m.Value).ToList<string>(); |
| parts.ForEach(delegate(string part) |
| parts.ForEach(delegate(string part) |
| { |
| { |
| string temp = part.Trim(new char[] |
| string temp = part.Trim(new char[] |
| { |
| { |
| '{' |
| '{' |
| }).Trim(new char[] |
| }).Trim(new char[] |
| { |
| { |
| '}' |
| '}' |
| }); |
| }); |
| string add = string.Empty; |
| string add = string.Empty; |
| bool flag = dictionaryValues.ContainsKey(temp); |
| bool flag = dictionaryValues.ContainsKey(temp); |
| if (flag) |
| if (flag) |
| { |
| { |
| bool flag2 = this.Where == "input[id=data_da_disponibilizStr]" && dictionaryValues["SearchElements.Fields.Tipo"] == "Publicação"; |
| bool flag2 = this.Where == "input[id=data_da_disponibilizStr]" && dictionaryValues["SearchElements.Fields.Tipo"] == "Publicação"; |
| if (flag2) |
| if (flag2) |
| { |
| { |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), -1).ToString("dd/MM/yyyy"); |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), -1).ToString("dd/MM/yyyy"); |
| } |
| } |
| else |
| else |
| { |
| { |
| bool flag3 = this.Where == "input[id=data_de_publicacaoStr]" && (dictionaryValues["SearchElements.Fields.Tipo"] == "Disponibilização" || dictionaryValues["SearchElements.Fields.Tipo"] == "Divulgação"); |
| bool flag3 = this.Where == "input[id=data_de_publicacaoStr]" && (dictionaryValues["SearchElements.Fields.Tipo"] == "Disponibilização" || dictionaryValues["SearchElements.Fields.Tipo"] == "Divulgação"); |
| if (flag3) |
| if (flag3) |
| { |
| { |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), 1).ToString("dd/MM/yyyy"); |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), 1).ToString("dd/MM/yyyy"); |
| } |
| } |
| else |
| else |
| { |
| { |
| add += dictionaryValues[temp]; |
| add += dictionaryValues[temp]; |
| } |
| } |
| } |
| } |
| bool flag4 = this.Replace != null; |
| bool flag4 = this.Replace != null; |
| if (flag4) |
| if (flag4) |
| { |
| { |
| this.Replace.Split(new char[] |
| this.Replace.Split(new char[] |
| { |
| { |
| ';' |
| ';' |
| }).ToList<string>().ForEach(delegate(string x) |
| }).ToList<string>().ForEach(delegate(string x) |
| { |
| { |
| string[] p = x.Split(new char[] |
| string[] p = x.Split(new char[] |
| { |
| { |
| ',' |
| ',' |
| }); |
| }); |
| add = System.Text.RegularExpressions.Regex.Replace(add, p[0], p[1]); |
| add = System.Text.RegularExpressions.Regex.Replace(add, p[0], p[1]); |
| }); |
| }); |
| } |
| } |
| } |
| } |
| result = result.Replace(part, add.Replace(">", ">")); |
| result = result.Replace(part, add.Replace(">", ">")); |
| }); |
| }); |
| result = ((result != string.Empty) ? result : value); |
| result = ((result != string.Empty) ? result : value); |
| return (this.MaxLength > 0) ? result.Substring(0, Math.Min(result.Length, this.MaxLength)) : result; |
| return (this.MaxLength > 0) ? result.Substring(0, Math.Min(result.Length, this.MaxLength)) : result; |
| } |
| } |
| |
| |
| // Token: 0x06000131 RID: 305 RVA: 0x00007C8C File Offset: 0x00005E8C |
| // Token: 0x060000E0 RID: 224 RVA: 0x000066F8 File Offset: 0x000048F8 |
| public string ReplaceValue(string value, Dictionary<string, string> dictionaryValues) |
| public string ReplaceValue(string value, Dictionary<string, string> dictionaryValues) |
| { |
| { |
| string result = string.Empty; |
| string result = string.Empty; |
| List<string> parts = (from Match m in System.Text.RegularExpressions.Regex.Matches(value, "\\{[^\\}]*\\}|([:=\\[\\(\\{]{0}[a-zA-Z0-9_%@\\-\\.\\/:?=&;]{1,})") |
| List<string> parts = (from Match m in System.Text.RegularExpressions.Regex.Matches(value, "\\{[^\\}]*\\}|([:=\\[\\(\\{]{0}[a-zA-Z0-9_%@\\-\\.\\/:?=&;]{1,})") |
| select m.Value).ToList<string>(); |
| select m.Value).ToList<string>(); |
| parts.ForEach(delegate(string part) |
| parts.ForEach(delegate(string part) |
| { |
| { |
| string temp = part.Trim(new char[] |
| string temp = part.Trim(new char[] |
| { |
| { |
| '{' |
| '{' |
| }).Trim(new char[] |
| }).Trim(new char[] |
| { |
| { |
| '}' |
| '}' |
| }); |
| }); |
| string add = string.Empty; |
| string add = string.Empty; |
| bool flag = System.Text.RegularExpressions.Regex.IsMatch(temp, "\\$_Now"); |
| bool flag = System.Text.RegularExpressions.Regex.IsMatch(temp, "\\$_Now"); |
| if (flag) |
| if (flag) |
| { |
| { |
| DateTime dateNow = DateTime.Now; |
| DateTime dateNow = DateTime.Now; |
| int day = 0; |
| int day = 0; |
| string[] p = temp.Split(new char[] |
| string[] p = temp.Split(new char[] |
| { |
| { |
| '?' |
| '?' |
| }); |
| }); |
| bool flag2 = p.Count<string>() == 1; |
| bool flag2 = p.Count<string>() == 1; |
| if (flag2) |
| if (flag2) |
| { |
| { |
| bool flag3 = System.Text.RegularExpressions.Regex.IsMatch(p[0], "\\."); |
| bool flag3 = System.Text.RegularExpressions.Regex.IsMatch(p[0], "\\."); |
| if (flag3) |
| if (flag3) |
| { |
| { |
| day = int.Parse(temp.Split(new char[] |
| day = int.Parse(temp.Split(new char[] |
| { |
| { |
| '.' |
| '.' |
| }).Last<string>()); |
| }).Last<string>()); |
| } |
| } |
| } |
| } |
| else |
| else |
| { |
| { |
| string @operator = (from Match match in System.Text.RegularExpressions.Regex.Matches(p[0], "([!=<>]{1,2}[<>=]?)") |
| string @operator = (from Match match in System.Text.RegularExpressions.Regex.Matches(p[0], "([!=<>]{1,2}[<>=]?)") |
| select match.Value).First<string>(); |
| select match.Value).First<string>(); |
| string[] s = p[0].Split(new string[] |
| string[] s = p[0].Split(new string[] |
| { |
| { |
| @operator |
| @operator |
| }, StringSplitOptions.RemoveEmptyEntries); |
| }, StringSplitOptions.RemoveEmptyEntries); |
| int hours = int.Parse(s[1]); |
| int hours = int.Parse(s[1]); |
| string[] days = p[1].Split(new char[] |
| string[] days = p[1].Split(new char[] |
| { |
| { |
| ':' |
| ':' |
| }); |
| }); |
| bool flag4 = (@operator == "==" && dateNow.Hour == hours) || (@operator == "!=" && dateNow.Hour != hours) || (@operator == "<=" && dateNow.Hour <= hours) || (@operator == ">=" && dateNow.Hour >= hours) || (@operator == ">" && dateNow.Hour > hours) || (@operator == "<" && dateNow.Hour < hours); |
| bool flag4 = (@operator == "==" && dateNow.Hour == hours) || (@operator == "!=" && dateNow.Hour != hours) || (@operator == "<=" && dateNow.Hour <= hours) || (@operator == ">=" && dateNow.Hour >= hours) || (@operator == ">" && dateNow.Hour > hours) || (@operator == "<" && dateNow.Hour < hours); |
| if (flag4) |
| if (flag4) |
| { |
| { |
| day = int.Parse(days[0]); |
| day = int.Parse(days[0]); |
| } |
| } |
| else |
| else |
| { |
| { |
| day = int.Parse(days[1]); |
| day = int.Parse(days[1]); |
| } |
| } |
| } |
| } |
| add = ((day == 0) ? dateNow.ToString("dd/MM/yyyy") : this.getBusinessDay(DateTime.Now, day).ToString("dd/MM/yyyy")); |
| add = ((day == 0) ? dateNow.ToString("dd/MM/yyyy") : this.getBusinessDay(DateTime.Now, day).ToString("dd/MM/yyyy")); |
| } |
| } |
| bool flag5 = dictionaryValues.ContainsKey(temp); |
| bool flag5 = dictionaryValues.ContainsKey(temp); |
| if (flag5) |
| if (flag5) |
| { |
| { |
| bool flag6 = this.Where == "input[id=data_da_disponibilizStr]" && dictionaryValues["SearchElements.Fields.Tipo"] == "Publicação"; |
| bool flag6 = this.Where == "input[id=data_da_disponibilizStr]" && dictionaryValues["SearchElements.Fields.Tipo"] == "Publicação"; |
| if (flag6) |
| if (flag6) |
| { |
| { |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), -1).ToString("dd/MM/yyyy"); |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), -1).ToString("dd/MM/yyyy"); |
| } |
| } |
| else |
| else |
| { |
| { |
| bool flag7 = this.Where == "input[id=data_de_publicacaoStr]" && (dictionaryValues["SearchElements.Fields.Tipo"] == "Disponibilização" || dictionaryValues["SearchElements.Fields.Tipo"] == "Divulgação"); |
| bool flag7 = this.Where == "input[id=data_de_publicacaoStr]" && (dictionaryValues["SearchElements.Fields.Tipo"] == "Disponibilização" || dictionaryValues["SearchElements.Fields.Tipo"] == "Divulgação"); |
| if (flag7) |
| if (flag7) |
| { |
| { |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), 1).ToString("dd/MM/yyyy"); |
| add += this.getBusinessDay(DateTime.Parse(dictionaryValues[temp]), 1).ToString("dd/MM/yyyy"); |
| } |
| } |
| else |
| else |
| { |
| { |
| add += dictionaryValues[temp]; |
| add += dictionaryValues[temp]; |
| } |
| } |
| } |
| } |
| } |
| } |
| bool flag8 = add != string.Empty; |
| bool flag8 = add != string.Empty; |
| if (flag8) |
| if (flag8) |
| { |
| { |
| result += add; |
| result += add; |
| } |
| } |
| else |
| else |
| { |
| { |
| result += System.Text.RegularExpressions.Regex.Replace(part, "amp;", string.Empty); |
| result += System.Text.RegularExpressions.Regex.Replace(part, "amp;", string.Empty); |
| } |
| } |
| }); |
| }); |
| result = ((result != string.Empty) ? result : value); |
| result = ((result != string.Empty) ? result : value); |
| return (this.MaxLength > 0) ? result.Substring(0, Math.Min(result.Length, this.MaxLength)) : result; |
| return (this.MaxLength > 0) ? result.Substring(0, Math.Min(result.Length, this.MaxLength)) : result; |
| } |
| } |
| |
| |
| // Token: 0x06000132 RID: 306 RVA: 0x00007D60 File Offset: 0x00005F60 |
| // Token: 0x060000E1 RID: 225 RVA: 0x000067CC File Offset: 0x000049CC |
| private DateTime getBusinessDay(DateTime dateTime, int day) |
| private DateTime getBusinessDay(DateTime dateTime, int day) |
| { |
| { |
| DateTime currentDay = dateTime; |
| DateTime currentDay = dateTime; |
| bool flag; |
| bool flag; |
| do |
| do |
| { |
| { |
| currentDay = currentDay.AddDays((double)day); |
| currentDay = currentDay.AddDays((double)day); |
| flag = Shift.isDuringTheWeek(currentDay); |
| flag = Shift.isDuringTheWeek(currentDay); |
| } |
| } |
| while (!flag); |
| while (!flag); |
| return currentDay; |
| return currentDay; |
| } |
| } |
| |
| |
| // Token: 0x04000061 RID: 97 |
| // Token: 0x04000048 RID: 72 |
| private string where; |
| private string where; |
| |
| |
| // Token: 0x04000062 RID: 98 |
| // Token: 0x04000049 RID: 73 |
| private string value; |
| private string value; |
| } |
| } |
| } |
| } |
| |
| |