예제 #1
0
        private void WriteEvent()
        {
            AddHeader(
                "Name",
                "Add",
                "Remove",
                "Fire",
                "Attributes"
                );

            foreach (var handle in reader.EventDefinitions)
            {
                var entry     = reader.GetEvent(handle);
                var accessors = entry.GetAssociatedMethods();

                AddRow(
                    Literal(entry.Name),
                    Token(accessors.AddOn),
                    Token(accessors.RemoveOn),
                    Token(accessors.Fire),
                    EnumValue <int>(entry.Attributes)
                    );
            }

            WriteRows("Event (0x12, 0x14, 0x18):");
        }
예제 #2
0
        public static StringHandle[] GetEventDefNames(this MetadataReader reader)
        {
            var builder = ArrayBuilder <StringHandle> .GetInstance();

            foreach (var handle in reader.EventDefinitions)
            {
                var def = reader.GetEvent(handle);
                builder.Add(def.Name);
            }
            return(builder.ToArrayAndFree());
        }
예제 #3
0
 public static StringHandle[] GetEventDefNames(this MetadataReader reader)
 {
     return(reader.EventDefinitions.Select(handle => reader.GetEvent(handle).Name).ToArray());
 }