Ejemplo n.º 1
0
        /// <summary>
        /// The parse action set.
        /// </summary>
        /// <param name="actions">
        /// The actions.
        /// </param>
        /// <exception cref="Exception">
        /// </exception>
        private void ParseActionSet(List<Actions> actions)
        {
            bool flag = this.br.ReadInt32() != 36;
            if (flag)
            {
                throw new Exception("Why am I here?");
            }

            int arg_3D_0 = 1;
            int num = this.br.Read3F1();
            int num2 = arg_3D_0;
            checked
            {
                while (true)
                {
                    int arg_160_0 = num2;
                    int num3 = num;
                    if (arg_160_0 > num3)
                    {
                        break;
                    }

                    int actionNum = this.br.ReadInt32();
                    Actions aoa = new Actions();
                    aoa.ActionType = actionNum;
                    int numreqs = this.br.Read3F1();
                    List<Requirements> cookedreqs = this.ReadReqs(numreqs);
                    foreach (Requirements REQ in cookedreqs)
                    {
                        aoa.Requirements.Add(REQ);
                    }

                    if (actions == null)
                    {
                        actions = new List<Actions>();
                    }

                    actions.Add(aoa);
                    cookedreqs.Clear();
                    num2++;
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <returns>
        /// </returns>
        internal Actions Copy()
        {
            Actions copy = new Actions();
            copy.ActionType = this.ActionType;
            foreach (Requirements requirements in this.Requirements)
            {
                copy.Requirements.Add(requirements.Copy());
            }

            return copy;
        }