Beispiel #1
0
 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));
 }
Beispiel #6
0
 internal FatProfilerEntry(params FatProfilerEntry[] parents) : base(parents)
 {
     _childUpdateTimeCreateValueFat  = (key) => ProfilerData.MakeFatExternal(this, key);
     _childUpdateTimeCreateValueSlim = (key) => ProfilerData.MakeSlimExternal(this, key);
 }
Beispiel #7
0
 private static SlimProfilerEntry SingleMethodEntryProvider_SlimBlock_Damage(MySlimBlock __instance, MyStringHash damageType, string __key)
 {
     return(ProfilerData.EntityEntry(__instance?.CubeGrid)?.GetFat("Damage")?.GetSlim(damageType.String));
 }
Beispiel #8
0
 private static SlimProfilerEntry SingleMethodEntryProvider_SessionComponent(MySessionComponentBase __instance, string __key)
 {
     return(ProfilerData.SessionComponentEntry(__instance)?.GetSlim(__key));
 }
Beispiel #9
0
 // ReSharper disable UnusedMember.Local
 private static SlimProfilerEntry SingleMethodEntryProvider_Entity(IMyEntity __instance, string __key)
 {
     return(ProfilerData.EntityEntry(__instance)?.GetSlim(__key));
 }