Generalize ConvertAs method and make it private.