Ejemplo n.º 1
0
 /// <summary>
 /// Merge the two instance such that they have the same chunks and share the same ready counter. Common
 /// chunks are reset to non-ready. If one of the instances is null, the non-null instance is returned.
 /// </summary>
 /// <param name="first">The first instance.</param>
 /// <param name="second">The second instance.</param>
 /// <returns>The merged instance.</returns>
 public static SynchronisedUpdate MergeAndReset(SynchronisedUpdate first, SynchronisedUpdate second)
 {
     if (first != null)
     {
         if (second != null)
         {
             first.MergeAndReset(second);
             return first;
         }
         else
         {
             return first;
         }
     }
     else
     {
         return second;
     }
 }