Ejemplo n.º 1
0
 private static SlimProfilerEntry SingleMethodEntryProvider_GridConveyorRequest(IMyConveyorEndpointBlock __anyBlock, string __key)
 {
     if (__anyBlock is IMyEntity entity)
     {
         return(ProfilerData.EntityEntry(entity)?.GetSlim(__key));
     }
     return(null);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 private SlimProfilerEntry GetterImplGridSystem()
 {
     return(!_owner.IsAllocated || !_getterExtra[0].IsAllocated
         ? null
         : ProfilerData.GridSystemEntry(_owner.Target, _getterExtra[0].Target as IMyCubeGrid));
 }
Ejemplo n.º 4
0
 private SlimProfilerEntry GetterImplEntityComponent()
 {
     return(!_owner.IsAllocated
         ? null
         : ProfilerData.EntityComponentEntry(_owner.Target as MyEntityComponentBase));
 }
Ejemplo n.º 5
0
 private SlimProfilerEntry GetterImplEntity()
 {
     return(!_owner.IsAllocated ? null : ProfilerData.EntityEntry(_owner.Target as IMyEntity));
 }
Ejemplo n.º 6
0
 internal FatProfilerEntry(params FatProfilerEntry[] parents) : base(parents)
 {
     _childUpdateTimeCreateValueFat  = (key) => ProfilerData.MakeFatExternal(this, key);
     _childUpdateTimeCreateValueSlim = (key) => ProfilerData.MakeSlimExternal(this, key);
 }
Ejemplo n.º 7
0
 private static SlimProfilerEntry SingleMethodEntryProvider_SlimBlock_Damage(MySlimBlock __instance, MyStringHash damageType, string __key)
 {
     return(ProfilerData.EntityEntry(__instance?.CubeGrid)?.GetFat("Damage")?.GetSlim(damageType.String));
 }
Ejemplo n.º 8
0
 private static SlimProfilerEntry SingleMethodEntryProvider_SessionComponent(MySessionComponentBase __instance, string __key)
 {
     return(ProfilerData.SessionComponentEntry(__instance)?.GetSlim(__key));
 }
Ejemplo n.º 9
0
 // ReSharper disable UnusedMember.Local
 private static SlimProfilerEntry SingleMethodEntryProvider_Entity(IMyEntity __instance, string __key)
 {
     return(ProfilerData.EntityEntry(__instance)?.GetSlim(__key));
 }