调整Covert重命名为Convert

This commit is contained in:
monitor1394
2022-12-22 22:26:10 +08:00
parent d9053db2e3
commit bc6c387db3
14 changed files with 37 additions and 34 deletions

View File

@@ -179,23 +179,23 @@ namespace XCharts.Runtime
RefreshChart();
}
public bool CovertSerie<T>(Serie serie) where T : Serie
public bool ConvertSerie<T>(Serie serie) where T : Serie
{
return CovertSerie(serie, typeof(T));
return ConvertSerie(serie, typeof(T));
}
public bool CovertSerie(Serie serie, Type type)
public bool ConvertSerie(Serie serie, Type type)
{
try
{
var newSerie = type.InvokeMember("CovertSerie",
var newSerie = type.InvokeMember("ConvertSerie",
BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.Public, null, null,
new object[] { serie }) as Serie;
return ReplaceSerie(serie, newSerie);
}
catch
{
Debug.LogError(string.Format("CovertSerie Failed: can't found {0}.CovertSerie(Serie serie)", type.Name));
Debug.LogError(string.Format("ConvertSerie Failed: can't found {0}.ConvertSerie(Serie serie)", type.Name));
return false;
}
}