public override void SetPrefix(string prefix) { if (DirPattern.Exist(prefix, @"[0-9][0-9][0-9][0-9]", @"([0-9][0-9][0-9][0-9])\.png")) { Global.Debugf("info", "selecting OldBookStore"); p = new OldBookStore(); } else { Global.Debugf("info", "selecting (new) BookStore"); p = new BookStore(); } p.SetPrefix(prefix); }