public bool CanReset( string oldName, string newName )
{
lock ( sync )
{
if ( allocatedNames.Contains( newName ) )
return false;
if ( !regex.IsMatch( newName ) )
return false;
allocatedNames.Remove( oldName );
allocatedNames.Add( newName );
return true;
}
}