2
0

ValidateExcept.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.Runtime.CompilerServices;
  6. using Microsoft.VisualBasic;
  7. using Microsoft.VisualBasic.CompilerServices;
  8. namespace PCL
  9. {
  10. // Token: 0x02000148 RID: 328
  11. public class ValidateExcept : Validate
  12. {
  13. // Token: 0x17000212 RID: 530
  14. // (get) Token: 0x06000D7F RID: 3455 RVA: 0x00008A3F File Offset: 0x00006C3F
  15. // (set) Token: 0x06000D80 RID: 3456 RVA: 0x00008A47 File Offset: 0x00006C47
  16. public Collection<string> Excepts { get; set; }
  17. // Token: 0x06000D81 RID: 3457 RVA: 0x00008A50 File Offset: 0x00006C50
  18. [CompilerGenerated]
  19. public string FillClient()
  20. {
  21. return this._ExporterTests;
  22. }
  23. // Token: 0x06000D82 RID: 3458 RVA: 0x00008A58 File Offset: 0x00006C58
  24. [CompilerGenerated]
  25. public void WriteClient(string AutoPropertyValue)
  26. {
  27. this._ExporterTests = AutoPropertyValue;
  28. }
  29. // Token: 0x06000D83 RID: 3459 RVA: 0x00008A61 File Offset: 0x00006C61
  30. public ValidateExcept()
  31. {
  32. this.Excepts = new Collection<string>();
  33. this.WriteClient("输入内容不能包含 %!");
  34. }
  35. // Token: 0x06000D84 RID: 3460 RVA: 0x00008A80 File Offset: 0x00006C80
  36. public ValidateExcept(Collection<string> Excepts, string ErrorMessage = "输入内容不能包含 %!")
  37. {
  38. this.Excepts = new Collection<string>();
  39. this.Excepts = Excepts;
  40. this.WriteClient(ErrorMessage);
  41. }
  42. // Token: 0x06000D85 RID: 3461 RVA: 0x0005B9CC File Offset: 0x00059BCC
  43. public ValidateExcept(IEnumerable Excepts, string ErrorMessage = "输入内容不能包含 %!")
  44. {
  45. this.Excepts = new Collection<string>();
  46. this.Excepts = new Collection<string>();
  47. this.WriteClient(ErrorMessage);
  48. try
  49. {
  50. foreach (object value in Excepts)
  51. {
  52. string item = Conversions.ToString(value);
  53. this.Excepts.Add(item);
  54. }
  55. }
  56. finally
  57. {
  58. IEnumerator enumerator;
  59. if (enumerator is IDisposable)
  60. {
  61. (enumerator as IDisposable).Dispose();
  62. }
  63. }
  64. }
  65. // Token: 0x06000D86 RID: 3462 RVA: 0x0005BA4C File Offset: 0x00059C4C
  66. public override string Validate(string Str)
  67. {
  68. try
  69. {
  70. foreach (string text in this.Excepts)
  71. {
  72. if (Str.IndexOfF(text, true) >= 0)
  73. {
  74. if (Information.IsNothing(this.FillClient()))
  75. {
  76. this.WriteClient("");
  77. }
  78. return this.FillClient().Replace("%", text);
  79. }
  80. }
  81. }
  82. finally
  83. {
  84. IEnumerator<string> enumerator;
  85. if (enumerator != null)
  86. {
  87. enumerator.Dispose();
  88. }
  89. }
  90. return "";
  91. }
  92. // Token: 0x0400070B RID: 1803
  93. [CompilerGenerated]
  94. private Collection<string> factoryTests;
  95. // Token: 0x0400070C RID: 1804
  96. [CompilerGenerated]
  97. private string _ExporterTests;
  98. }
  99. }