Exemplo n.º 1
0
            private void MoveNext()
            {
                int num = this.int_0;

                try
                {
                    if (num != 0)
                    {
                        if ((this.functionTag_0.ReferenceName == null) && (this.functionTag_0.ReferenceTag == null))
                        {
                            this.functionTag_0.ilog_0.Info("Cannot execute a Function tag that has no reference name, or tag set. This tag is only meant for easily referencing profile behavior steps in sequence.");
                            BotManager.Stop();
                            goto Label_0128;
                        }
                        this.enumerator_0 = this.functionTag_0.Children.GetEnumerator();
                    }
                    try
                    {
                        TaskAwaiter awaiter;
                        if (num == 0)
                        {
                            awaiter            = this.taskAwaiter_0;
                            this.taskAwaiter_0 = new TaskAwaiter();
                            num        = -1;
                            this.int_0 = -1;
                            goto Label_00AE;
                        }
Label_007C:
                        if (!this.enumerator_0.MoveNext())
                        {
                            goto Label_00F7;
                        }
                        ProfileElement current = this.enumerator_0.Current;
                        current.Reset();
                        awaiter = current.ProfileTagLogic().GetAwaiter();
                        if (!awaiter.IsCompleted)
                        {
                            goto Label_00C1;
                        }
Label_00AE:
                        awaiter.GetResult();
                        awaiter = new TaskAwaiter();
                        goto Label_007C;
Label_00C1:
                        num                = 0;
                        this.int_0         = 0;
                        this.taskAwaiter_0 = awaiter;
                        this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter, FunctionTag.Struct36>(ref awaiter, ref this);
                        return;
                    }
                    finally
                    {
                        if (num < 0)
                        {
                            this.enumerator_0.Dispose();
                        }
                    }
Label_00F7:
                    this.enumerator_0 = new List <ProfileElement> .Enumerator();

                    this.functionTag_0.bool_0 = true;
                }
                catch (Exception exception)
                {
                    this.int_0 = -2;
                    this.asyncTaskMethodBuilder_0.SetException(exception);
                    return;
                }
Label_0128:
                this.int_0 = -2;
                this.asyncTaskMethodBuilder_0.SetResult();
            }
Exemplo n.º 2
0
 private void MoveNext()
 {
     int num = this.int_0;
     try
     {
         if (num != 0)
         {
             this.switchTag_0.method_0();
             this.enumerator_0 = this.switchTag_0.switchArgument_0.Children.GetEnumerator();
         }
         try
         {
             TaskAwaiter awaiter;
             if (num == 0)
             {
                 awaiter = this.taskAwaiter_0;
                 this.taskAwaiter_0 = new TaskAwaiter();
                 num = -1;
                 this.int_0 = -1;
                 goto Label_0084;
             }
         Label_0052:
             if (!this.enumerator_0.MoveNext())
             {
                 goto Label_00CD;
             }
             ProfileElement current = this.enumerator_0.Current;
             current.Reset();
             awaiter = current.ProfileTagLogic().GetAwaiter();
             if (!awaiter.IsCompleted)
             {
                 goto Label_0097;
             }
         Label_0084:
             awaiter.GetResult();
             awaiter = new TaskAwaiter();
             goto Label_0052;
         Label_0097:
             num = 0;
             this.int_0 = 0;
             this.taskAwaiter_0 = awaiter;
             this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted<TaskAwaiter, SwitchTag.Struct41>(ref awaiter, ref this);
             return;
         }
         finally
         {
             if (num < 0)
             {
                 this.enumerator_0.Dispose();
             }
         }
     Label_00CD:
         this.enumerator_0 = new List<ProfileElement>.Enumerator();
         this.switchTag_0.bool_0 = true;
     }
     catch (Exception exception)
     {
         this.int_0 = -2;
         this.asyncTaskMethodBuilder_0.SetException(exception);
         return;
     }
     this.int_0 = -2;
     this.asyncTaskMethodBuilder_0.SetResult();
 }