* Added better support for Properties with index parameters, can now support multiple parameters and non-int parameters.
* Parameters are now formatted in a more expected fashion (in the `(Type arg0, Type arg1)` format).
* Got rid of all the ugly yellow text.
* Cleaned up some minor GUI display / layout issues.
* Refactored some of CacheMethod into CacheObjectBase
This commit is contained in:
sinaioutlander
2020-09-09 19:15:47 +10:00
parent 94f749342d
commit 6ea435deee
15 changed files with 339 additions and 218 deletions

74
src/Tests/TestClass.cs Normal file
View File

@ -0,0 +1,74 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MelonLoader;
using UnityEngine;
namespace Explorer.Tests
{
public class TestClass
{
public static TestClass Instance => m_instance ?? (m_instance = new TestClass());
private static TestClass m_instance;
public string this[int index]
{
get
{
return $"int indexer: {index}";
}
}
public string this[string stringIndex]
{
get
{
return $"string indexer: {stringIndex}";
}
}
public string this[int arg0, string arg1]
{
get
{
return $"arg0: {arg0}, arg1: {arg1}";
}
}
public static List<string> TestList = new List<string>
{
"1",
"2",
"3",
"etc..."
};
public static Dictionary<int, List<string>> NestedDictionary = new Dictionary<int, List<string>>
{
{
123,
new List<string>
{
"One",
"Two"
}
},
{
567,
new List<string>
{
"One",
"Two"
}
},
};
public static Color TestMethod(float r, float g, float b, float a)
{
return new Color(r, g, b, a);
}
}
}