Compile() public method

compile action to byte code
public Compile ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter /// Binary writer for writing byte code to stream ///
return void
Exemplo n.º 1
0
 /// <see cref="SwfDotNet.IO.ByteCode.Actions.BaseAction.Compile"/>
 public override void Compile(BinaryWriter w)
 {
     for (int i = 0; i < actionList.Length; i++)
     {
         BaseAction action = (BaseAction)actionList[i];
         action.Compile(w);
     }
 }
Exemplo n.º 2
0
        /// <see cref="SwfDotNet.IO.ByteCode.Actions.BaseAction.Compile"/>
        public override void Compile(BinaryWriter w)
        {
            w.Write(Convert.ToByte(Code));
            w.Write(Convert.ToUInt16(ByteCount - innerByteCount - 3));
            BinaryStringRW.WriteString(w, Name);

            w.Write(Convert.ToUInt16(ParameterList.Length));
            foreach (string str in ParameterList)
            {
                BinaryStringRW.WriteString(w, str);
            }

            w.Write(Convert.ToUInt16(innerByteCount));
            foreach (object a in ActionRecord)
            {
                BaseAction action = (BaseAction)a;
                action.Compile(w);
            }
        }
Exemplo n.º 3
0
        /// <see cref="SwfDotNet.IO.ByteCode.Actions.BaseAction.Compile"/>
        public override void Compile(BinaryWriter w)
        {
            w.Write(Convert.ToByte(Code));
            w.Write(Convert.ToUInt16(ByteCount - InnerByteCount - 3));
            BinaryStringRW.WriteString(w, Name);

            w.Write(Convert.ToUInt16(ParameterList.Length));
            w.Write(Convert.ToByte(RegisterCount));
            w.Write(flags.Bytecode);

            foreach (RegParamPair rp in ParameterList)
            {
                w.Write(Convert.ToByte(rp.Register));
                BinaryStringRW.WriteString(w, rp.Parameter);
            }

            w.Write(Convert.ToUInt16(InnerByteCount));

            foreach (object a in ActionRecord)
            {
                BaseAction action = (BaseAction)a;
                action.Compile(w);
            }
        }