Exemplo n.º 1
0
        internal static PatchInfo GetPatchInfo(MethodBase method)
        {
            var bytes = GetState().GetValueSafe(method);

            if (bytes is null)
            {
                return(null);
            }
            return(PatchInfoSerialization.Deserialize(bytes));
        }
Exemplo n.º 2
0
 internal static PatchInfo GetPatchInfo(MethodBase method)
 {
     byte[] bytes;
     lock (state) bytes = state.GetValueSafe(method);
     if (bytes is null)
     {
         return(null);
     }
     return(PatchInfoSerialization.Deserialize(bytes));
 }
Exemplo n.º 3
0
 internal static PatchInfo GetPatchInfo(MethodBase method)
 {
     return(WithState(() =>
     {
         var bytes = state.GetValueSafe(method);
         if (bytes is null)
         {
             return null;
         }
         return PatchInfoSerialization.Deserialize(bytes);
     }));
 }
Exemplo n.º 4
0
 /// <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));
 }
Exemplo n.º 5
0
            /// <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));
            }