mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 00:20:18 +00:00
3.0
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
@@ -62,7 +61,7 @@ namespace XCharts.Runtime
|
||||
public static T GetAttribute<T>(this Type type, bool check = true) where T : Attribute
|
||||
{
|
||||
if (type.IsDefined(typeof(T), false))
|
||||
return (T)type.GetCustomAttributes(typeof(T), false)[0];
|
||||
return (T) type.GetCustomAttributes(typeof(T), false) [0];
|
||||
else
|
||||
{
|
||||
if (check)
|
||||
@@ -73,7 +72,7 @@ namespace XCharts.Runtime
|
||||
public static T GetAttribute<T>(this MemberInfo type, bool check = true) where T : Attribute
|
||||
{
|
||||
if (type.IsDefined(typeof(T), false))
|
||||
return (T)type.GetCustomAttributes(typeof(T), false)[0];
|
||||
return (T) type.GetCustomAttributes(typeof(T), false) [0];
|
||||
else
|
||||
{
|
||||
if (check)
|
||||
|
||||
Reference in New Issue
Block a user