public static Match Synchronized(Match inner)
{
if (inner == null)
throw new ArgumentNullException(nameof(inner));
int numgroups = inner._matchcount.Length;
// Populate all groups by looking at each one
for (int i = 0; i < numgroups; i++)
{
Group group = inner.Groups[i];
// Depends on the fact that Group.Synchronized just
// operates on and returns the same instance
Group.Synchronized(group);
}
return inner;
}