public static bool InsertIssuer(Type spec, object vis, [_0008._0012(2)] ProducerIteratorMapping _0004, [ConsumerBroadcasterDispatcher(true)][_0008._0012(2)] out string _0005) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 ThreadComposer threadComposer = _EventTest.InitReader(new GDBD.Workers.TemplateComposerWorker <Type, ProducerIteratorMapping>(spec, _0004)); ulong num = StopIssuer(vis); if (!threadComposer._ConsumerComposer) { int num2 = Array.BinarySearch(threadComposer.comparatorComposer, num); if (num2 >= 0) { _0005 = threadComposer._RecordTest[num2]; return(true); } _0005 = null; return(false); } _0005 = FlushIssuer(threadComposer, num); return(_0005 != null); }
private static string FlushIssuer(ThreadComposer i, ulong attramount) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 string[] recordTest = i._RecordTest; ulong[] comparatorComposer = i.comparatorComposer; int num = comparatorComposer.Length - 1; StringBuilder stringBuilder = new StringBuilder(); bool flag = true; ulong num2 = attramount; while (num >= 0 && (num != 0 || comparatorComposer[num] != 0L)) { if ((attramount & comparatorComposer[num]) == comparatorComposer[num]) { attramount -= comparatorComposer[num]; if (!flag) { stringBuilder.Insert(0, ", "); } string value = recordTest[num]; stringBuilder.Insert(0, value); flag = false; } num--; } if (attramount != 0L) { return(null); } if (num2 == 0L) { if (comparatorComposer.Length != 0 && comparatorComposer[0] == 0L) { return(recordTest[0]); } return(null); } return(stringBuilder.ToString()); }
public static object CloneIssuer(Type param, ProducerIteratorMapping cfg, string role, bool isvalue2) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 ContextClientBridge.RunClient(param, "enumType"); ContextClientBridge.RunClient(role, "value"); if (!param.LoginClient()) { throw new ArgumentException("Type provided must be an Enum.", "enumType"); } ThreadComposer threadComposer = _EventTest.InitReader(new GDBD.Workers.TemplateComposerWorker <Type, ProducerIteratorMapping>(param, cfg)); string[] procComposer = threadComposer.procComposer; string[] recordTest = threadComposer._RecordTest; ulong[] comparatorComposer = threadComposer.comparatorComposer; int? num = VisitIssuer(recordTest, role, 0, role.Length, StringComparison.Ordinal); if (num.HasValue) { return(Enum.ToObject(param, comparatorComposer[num.Value])); } int num2 = -1; for (int i = 0; i < role.Length; i++) { if (!char.IsWhiteSpace(role[i])) { num2 = i; break; } } if (num2 == -1) { throw new ArgumentException("Must specify valid information for parsing in the string."); } char c = role[num2]; if (char.IsDigit(c) || c == '-' || c == '+') { Type underlyingType = Enum.GetUnderlyingType(param); role = role.Trim(); object obj = null; try { obj = Convert.ChangeType(role, underlyingType, CultureInfo.InvariantCulture); } catch (FormatException) { } if (obj != null) { if (isvalue2) { throw new FormatException("Integer string '{0}' is not allowed.".ListReader(CultureInfo.InvariantCulture, role)); } return(Enum.ToObject(param, obj)); } } ulong num3 = 0uL; int j = num2; while (j <= role.Length) { int num4 = role.IndexOf(',', j); if (num4 == -1) { num4 = role.Length; } int num5 = num4; for (; j < num4 && char.IsWhiteSpace(role[j]); j++) { } while (num5 > j && char.IsWhiteSpace(role[num5 - 1])) { num5--; } int instance3_offset = num5 - j; num = LogoutIssuer(role, procComposer, recordTest, j, instance3_offset, StringComparison.Ordinal); if (!num.HasValue) { num = LogoutIssuer(role, procComposer, recordTest, j, instance3_offset, StringComparison.OrdinalIgnoreCase); } if (!num.HasValue) { num = VisitIssuer(recordTest, role, 0, role.Length, StringComparison.OrdinalIgnoreCase); if (num.HasValue) { return(Enum.ToObject(param, comparatorComposer[num.Value])); } throw new ArgumentException("Requested value '{0}' was not found.".ListReader(CultureInfo.InvariantCulture, role)); } num3 |= comparatorComposer[num.Value]; j = num4 + 1; } return(Enum.ToObject(param, num3)); }