internal static PatchInfo GetPatchInfo(MethodBase method) { var bytes = GetState().GetValueSafe(method); if (bytes is null) { return(null); } return(PatchInfoSerialization.Deserialize(bytes)); }
internal static PatchInfo GetPatchInfo(MethodBase method) { byte[] bytes; lock (state) bytes = state.GetValueSafe(method); if (bytes is null) { return(null); } return(PatchInfoSerialization.Deserialize(bytes)); }
internal static PatchInfo GetPatchInfo(MethodBase method) { return(WithState(() => { var bytes = state.GetValueSafe(method); if (bytes is null) { return null; } return PatchInfoSerialization.Deserialize(bytes); })); }
/// <summary>Determines how patches sort</summary> /// <param name="obj">The other patch</param> /// <returns>integer to define sort order (-1, 0, 1)</returns> /// public int CompareTo(object obj) { return(PatchInfoSerialization.PriorityComparer(obj, index, priority)); }
/// <summary>Determines how patches sort</summary> /// <param name="obj">The other patch</param> /// <returns>integer to define sort order (-1, 0, 1)</returns> public int CompareTo(object obj) { var p = obj as PatchSortingWrapper; return(PatchInfoSerialization.PriorityComparer(p?.innerPatch, innerPatch.index, innerPatch.priority)); }