Exemplo n.º 1
0
        private static void DumpMembers(TextWriter writer, AbcTraitCollection traits, string tab, bool isStatic)
        {
            string prefix = isStatic ? "Static" : "Instance";

            bool eol    = false;
            var  fields = traits.GetFields();

            if (fields != null && fields.Length > 0)
            {
                writer.WriteLine("{0}#region {1} Fields", tab, prefix);
                for (int i = 0; i < fields.Length; ++i)
                {
                    if (i > 0)
                    {
                        writer.WriteLine();
                    }
                    fields[i].DumpField(writer, tab, isStatic);
                }
                writer.WriteLine("{0}#endregion", tab);
                eol = true;
            }

            var props = traits.GetProperties();

            if (props.Count > 0)
            {
                if (eol)
                {
                    writer.WriteLine();
                }
                writer.WriteLine("{0}#region {1} Properties", tab, prefix);
                props.Dump(writer, tab, isStatic);
                writer.WriteLine("{0}#endregion", tab);
                eol = true;
            }

            var methods = traits.GetMethods();

            if (methods != null && methods.Length > 0)
            {
                if (eol)
                {
                    writer.WriteLine();
                }
                writer.WriteLine("{0}#region {1} Methods", tab, prefix);
                int n = methods.Length;
                for (int i = 0; i < n; ++i)
                {
                    if (i > 0)
                    {
                        writer.WriteLine();
                    }
                    methods[i].Dump(writer, tab, isStatic);
                }
                writer.WriteLine("{0}#endregion", tab);
            }
        }
Exemplo n.º 2
0
 public AbcMethodBody()
 {
     _traits = new AbcTraitCollection(this);
     Index   = -1;
 }
Exemplo n.º 3
0
 public AbcClass()
 {
     _traits = new AbcTraitCollection(this);
 }
Exemplo n.º 4
0
 public AbcInstance()
 {
     _traits = new AbcTraitCollection(this);
 }
Exemplo n.º 5
0
 public AbcScript()
 {
     _traits = new AbcTraitCollection(this);
 }