mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Removed unused Weaver ResolveInheritanceHierarchy function
This commit is contained in:
parent
ea1e571ccd
commit
29f55fed48
@ -78,45 +78,6 @@ public static bool ImplementsSyncObject(TypeReference typeRef)
|
||||
return false;
|
||||
}
|
||||
|
||||
public static IEnumerable<TypeReference> ResolveInheritanceHierarchy(TypeReference type)
|
||||
{
|
||||
// for value types the hierarchy is pre-defined as "<Self> : System.ValueType : System.Object"
|
||||
if (type.IsValueType)
|
||||
{
|
||||
yield return type;
|
||||
yield return Weaver.valueTypeType;
|
||||
yield return Weaver.objectType;
|
||||
yield break;
|
||||
}
|
||||
|
||||
// resolve entire hierarchy from <Self> to System.Object
|
||||
while (type != null && type.FullName != Weaver.objectType.FullName)
|
||||
{
|
||||
yield return type;
|
||||
|
||||
try
|
||||
{
|
||||
var typeDef = type.Resolve();
|
||||
if (typeDef == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = typeDef.BaseType;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// when calling type.Resolve() we can sometimes get an exception if some dependant library
|
||||
// could not be loaded (for whatever reason) so just swallow it and break out of the loop
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
yield return Weaver.objectType;
|
||||
}
|
||||
|
||||
public static string DestinationFileFor(string outputDir, string assemblyPath)
|
||||
{
|
||||
var fileName = Path.GetFileName(assemblyPath);
|
||||
|
Loading…
Reference in New Issue
Block a user