private static SlimProfilerEntry SingleMethodEntryProvider_GridConveyorRequest(IMyConveyorEndpointBlock __anyBlock, string __key) { if (__anyBlock is IMyEntity entity) { return(ProfilerData.EntityEntry(entity)?.GetSlim(__key)); } return(null); }
internal void SetTarget(ProfilerFixedEntry owner) { if (owner == ProfilerFixedEntry.Count) { throw new ArgumentOutOfRangeException(nameof(owner), "Must not be the count enum"); } _fixedEntry = owner; FreeHandles(); _owner = GCHandle.Alloc(owner, GCHandleType.Weak); // we can capture here since its a value type _getter = () => ProfilerData.FixedProfiler(owner); }
private SlimProfilerEntry GetterImplGridSystem() { return(!_owner.IsAllocated || !_getterExtra[0].IsAllocated ? null : ProfilerData.GridSystemEntry(_owner.Target, _getterExtra[0].Target as IMyCubeGrid)); }
private SlimProfilerEntry GetterImplEntityComponent() { return(!_owner.IsAllocated ? null : ProfilerData.EntityComponentEntry(_owner.Target as MyEntityComponentBase)); }
private SlimProfilerEntry GetterImplEntity() { return(!_owner.IsAllocated ? null : ProfilerData.EntityEntry(_owner.Target as IMyEntity)); }
internal FatProfilerEntry(params FatProfilerEntry[] parents) : base(parents) { _childUpdateTimeCreateValueFat = (key) => ProfilerData.MakeFatExternal(this, key); _childUpdateTimeCreateValueSlim = (key) => ProfilerData.MakeSlimExternal(this, key); }
private static SlimProfilerEntry SingleMethodEntryProvider_SlimBlock_Damage(MySlimBlock __instance, MyStringHash damageType, string __key) { return(ProfilerData.EntityEntry(__instance?.CubeGrid)?.GetFat("Damage")?.GetSlim(damageType.String)); }
private static SlimProfilerEntry SingleMethodEntryProvider_SessionComponent(MySessionComponentBase __instance, string __key) { return(ProfilerData.SessionComponentEntry(__instance)?.GetSlim(__key)); }
// ReSharper disable UnusedMember.Local private static SlimProfilerEntry SingleMethodEntryProvider_Entity(IMyEntity __instance, string __key) { return(ProfilerData.EntityEntry(__instance)?.GetSlim(__key)); }