private static void HasNotChanged(Type type) { var projectResolver = new ProjectResolver(); var typeLoader = new ReflectionTypeLoader(); var projectInfo = projectResolver.GetProjectInfo(type); var api = typeLoader.LoadApi(type); Directory.CreateDirectory(projectInfo.TestFolderPath); if (!projectResolver.ApiFileExists(projectInfo, type)) { projectResolver.WriteApiToFile(projectInfo, type, api); return; } var existingApi = projectResolver.ReadApiFromFile(projectInfo, type); var compareStrategy = new BestGuessEndpointMatchingStrategy(); var comparer = new ApiComparer(compareStrategy); comparer.Compare(existingApi, api); // Nice to have: // Fields / Events / Delegates // Supporting constructor arguments on attributes // Multiple public types per file // custom struct as type // Re-generate the output file if there are changes to the API that aren't breaking }
internal static List <SymbolMismatch> GetApiDifferences(MyType originalApi, MyType newApi) { var strategy = new BestGuessEndpointMatchingStrategy(); return(strategy.GetApiDifferences(originalApi, newApi)); }