mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
type safe type comparison
This commit is contained in:
parent
541b516d60
commit
85d26ebce6
@ -108,12 +108,12 @@ public static bool IsArrayType(this TypeReference tr)
|
||||
|
||||
public static bool IsArraySegment(this TypeReference td)
|
||||
{
|
||||
return td.FullName.StartsWith("System.ArraySegment`1", System.StringComparison.Ordinal);
|
||||
return td.Resolve().Is(typeof(ArraySegment<>));
|
||||
}
|
||||
|
||||
public static bool IsList(this TypeReference td)
|
||||
{
|
||||
return td.FullName.StartsWith("System.Collections.Generic.List`1", System.StringComparison.Ordinal);
|
||||
return td.Resolve().Is(typeof(List<>));
|
||||
}
|
||||
|
||||
public static bool CanBeResolved(this TypeReference parent)
|
||||
|
Loading…
Reference in New Issue
Block a user