Closed IRacle1 closed 10 months ago
All tests passed except for game resources, so alright
Thank you for your contribution!
I'll check this in the nearest time
For now I've noticed that you've used the dev
branch. This branch is outdated for 4 months.
But! It's okay, I'll add your branch to the main one eventually.
Maybe I should write to contribution.md about which branches it's worth creating your own features from
I've finished
If you don't have any questions, we can release this!
I've finished If you don't have any questions, we can release this!
Yeah, tnx for your changes, now all looks great. i also changed linq expression by a usefull flag, should work faster
i also changed linq expression by a usefull flag, should work faster
Oh, great!
I didn't notice this flag
You're right about performance, it's almost 2x faster!
Method | Mean | Error | StdDev | Median | Gen0 | Allocated |
---|---|---|---|---|---|---|
BindingFlag | 69.17 ns | 1.817 ns | 5.330 ns | 67.35 ns | 0.0305 | 64 B |
Linq | 108.19 ns | 2.207 ns | 4.407 ns | 106.65 ns | 0.0421 | 88 B |
class A
{
protected int X;
}
class B : A
{
protected int Y;
}
[MemoryDiagnoser]
public class GetFieldsBenchmarks
{
private Consumer c = new Consumer();
[Benchmark]
public void BindingFlag()
{
typeof(B).GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly).Consume(c);
}
[Benchmark]
public void Linq()
{
typeof(B).GetFields(BindingFlags.NonPublic | BindingFlags.Instance).Where(x => x.DeclaringType == typeof(B)).Consume(c);
}
}
IReadOnlyCollection
instead ofIEnumerable
inLocalLevels
MultiTrigger
property forTouch
andSpawn
triggers (also idk aboutIgnoreField
, i think it can be deleted)GameModeratorType
for readability inAccount
classI also changed logic in typedescriptor,
GetPropertiesAndFields
, for old logic fields in inherited classes werent work properly, the logic in my pr works fine for that, but I still could be wrong