mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-26 21:42:11 +00:00
This commit is contained in:
parent
1f9a36ddf8
commit
ef481ad578
1 changed files with 24 additions and 21 deletions
|
|
@ -465,28 +465,33 @@ namespace Cosmos.IL2CPU {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: For signature ones, we could cache the attrib. Thats
|
// If we found a matching method, check for attributes
|
||||||
// why we check for null here
|
// that might disable it.
|
||||||
if (xAttrib == null) {
|
if (xResult != null) {
|
||||||
// TODO: Only allow one, but this code for now takes the last one
|
//TODO: For signature ones, we could cache the attrib. Thats
|
||||||
// if there is more than one
|
// why we check for null here
|
||||||
foreach (PlugMethodAttribute x in xResult.GetCustomAttributes(typeof(PlugMethodAttribute), false)) {
|
if (xAttrib == null) {
|
||||||
xAttrib = x;
|
// TODO: Only allow one, but this code for now takes the last one
|
||||||
|
// if there is more than one
|
||||||
|
foreach (PlugMethodAttribute x in xResult.GetCustomAttributes(typeof(PlugMethodAttribute), false)) {
|
||||||
|
xAttrib = x;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// See if we need to disable this plug
|
// See if we need to disable this plug
|
||||||
if (xAttrib != null) {
|
if (xAttrib != null) {
|
||||||
if (!xAttrib.Enabled) {
|
if (!xAttrib.Enabled) {
|
||||||
xResult = null;
|
xResult = null;
|
||||||
} else if (xAttrib.IsMonoOnly) {
|
} else if (xAttrib.IsMonoOnly) {
|
||||||
//TODO: Check this against build options
|
//TODO: Check this against build options
|
||||||
//TODO: Two exclusive IsOnly's dont make sense
|
//TODO: Two exclusive IsOnly's dont make sense
|
||||||
// refactor these as a positive rather than negative
|
// refactor these as a positive rather than negative
|
||||||
// Same thing at type plug level
|
// Same thing at type plug level
|
||||||
xResult = null;
|
xResult = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return xResult;
|
||||||
//Type xAssembler = null;
|
//Type xAssembler = null;
|
||||||
// } else if (xAttrib.Signature != null) {
|
// } else if (xAttrib.Signature != null) {
|
||||||
// System_Void__Indy_IL2CPU_Assembler_Assembler__cctor__
|
// System_Void__Indy_IL2CPU_Assembler_Assembler__cctor__
|
||||||
|
|
@ -610,8 +615,6 @@ namespace Cosmos.IL2CPU {
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
return xResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MethodBase ResolvePlug(MethodBase aMethod, Type[] aParamTypes) {
|
protected MethodBase ResolvePlug(MethodBase aMethod, Type[] aParamTypes) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue