CrabUI
Loading...
Searching...
No Matches
FillMethods.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Reflection;
5using System.Diagnostics;
6using System.Runtime.CompilerServices;
7using System.IO;
8
9using Barotrauma;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Input;
12using Microsoft.Xna.Framework.Graphics;
13using HarmonyLib;
14using CrabUI;
15
16namespace CrabUITest
17{
18 /// <summary>
19 /// This class contains filling methods
20 /// An Action<CUIComponent> that creates some GUI and attaches it to passed component
21 /// I use them in testing, you can use them as examples
22 /// </summary>
23 public partial class FillMethods
24 {
25 public static bool IsTestMethod(MethodInfo mi)
26 {
27 ParameterInfo[] args = mi.GetParameters();
28 bool correctSignature = args.Length == 1 && args[0].ParameterType == typeof(CUIComponent);
29 bool shoudIgnore = Attribute.IsDefined(mi, typeof(IgnoreAttribute));
30
31 return mi.IsStatic && mi.IsPublic && correctSignature && !shoudIgnore;
32 }
33 }
34}
Base class for all components.
This class contains filling methods An Action<CUIComponent> that creates some GUI and attaches it t...