Use .Net Contracts instead of Precondition methods and define contracts for all public methods. Change static class rawExt to internal.