29 Console.WriteLine(
"Sb Init");
33 Console.WriteLine(
"Sb.Init failed with error " + err);
40 if (solutionInfo ==
null || solutionInfo.
Error() !=
SbError.SB_ERR_NONE)
42 err = solutionInfo ==
null ?
SbError.SB_ERR_INSUFFICIENT_FREE_MEMORY : solutionInfo.
Error();
43 Console.WriteLine(
"SbSolution.GetInfo failed");
46 else if (solutionInfo.
projects.Length == 0)
48 err =
SbError.SB_ERR_PROJECT_NOT_FOUND;
49 Console.WriteLine(
"SbSolution.GetInfo no projects found");
52 Console.WriteLine(
"GetProjectsInfo, found " + solutionInfo.
projects.Length +
" projects");
54 for (
int t = 1; t <= 6; t += 5)
56 Console.WriteLine(
"----------------------------------------------------------------------");
57 Console.WriteLine(
"Test all the project in the solution with thread number equal to " + t);
58 Console.WriteLine(
"----------------------------------------------------------------------");
64 for (
int i = 0; i < solutionInfo.
projects.Length; i++)
66 Console.WriteLine(
"Project " + solutionInfo.
projects[i].name);
72 err = prj ==
null ?
SbError.SB_ERR_INSUFFICIENT_FREE_MEMORY : prj.
Error();
73 Console.WriteLine(
"SbProject.Load failed with error " + err);
90 Console.WriteLine(
"ERROR: you cannot use the project");
94 Console.WriteLine(
"WARNING: you can use the project but with some limitations");
98 Console.WriteLine(
"OK: you can use the project without any limitations");
108 Console.WriteLine(
"");
118 Console.WriteLine(
"Release SqueezeBrains library");
121 Console.WriteLine(
"Press ENTER to terminate");
127 static void Main(
string[] args)
Tutorial 3 - How to check the compatibility of a project with a license configuration.
SbError Error()
Returns the error code of the last operation. If no error SbError.SB_ERR_NONE is returned.
static const String SbSolutionExt
Solution file extension
static SbError Release()
Releases all the resources allocated in the library
static SbError Init(String ^ license_file)
Init the SB Library. The function initializes all the functionalities of the library including the li...
License Class that wraps the sb_t_license structure. You must call the Dispose() method to free all ...
static String FormatConfiguration(SbLicenseConfigurationId id)
Formats the license configuration id
Parameters Class that wraps the sb_t_par structure. You must call the Dispose() method to free all th...
int num_threads
Num threads to be used for the detection
Project Class You must call the Dispose() method to free all the resources of the returned instance.
static SbProject Load(String^ solution_file, String^ project_uuid, SbProjectMode mode)
Loads an existing project from file.
String LicenseConfigurationCheck(SbLicenseConfigurationId id)
Checks if the project can be used with a license configuration.
SbPar GetPar()
Retrieves the project parameters structure.
SbError SetPar(SbPar^ par)
Sets the project parameters.
static SbSolutionInfo GetInfo(String^ solution_file)
Returns the information contained in the solution_file.
Solution Info Class that wraps the sb_t_solution_info structure
array< SbProjectInfo^> projects
Array of the projects information of the solution. sb_t_solution_info.projects
SbLicenseConfigurationId
License configuration id that wraps the sb_t_license_configuration_id enum.
SbProjectMode
Project loading or saving mode that wraps the sb_t_project_mode enum