30 Console.WriteLine(
"Sb Init");
34 Console.WriteLine(
"Sb.Init failed with error " + err);
41 if (solutionInfo ==
null || solutionInfo.
Error() !=
SbError.SB_ERR_NONE)
43 err = solutionInfo ==
null ?
SbError.SB_ERR_INSUFFICIENT_FREE_MEMORY : solutionInfo.
Error();
44 Console.WriteLine(
"SbSolution.GetInfo failed");
47 else if (solutionInfo.
projects.Length == 0)
49 err =
SbError.SB_ERR_PROJECT_NOT_FOUND;
50 Console.WriteLine(
"SbSolution.GetInfo no projects found");
53 Console.WriteLine(
"GetProjectsInfo, found " + solutionInfo.
projects.Length +
" projects");
55 for (
int t = 1; t <= 6; t += 5)
57 Console.WriteLine(
"----------------------------------------------------------------------");
58 Console.WriteLine(
"Test all the project in the solution with thread number equal to " + t);
59 Console.WriteLine(
"----------------------------------------------------------------------");
65 for (
int i = 0; i < solutionInfo.
projects.Length; i++)
67 Console.WriteLine(
"Project " + solutionInfo.
projects[i].name);
73 err = prj ==
null ?
SbError.SB_ERR_INSUFFICIENT_FREE_MEMORY : prj.
Error();
74 Console.WriteLine(
"SbProject.Load failed with error " + err);
91 Console.WriteLine(
"ERROR: you cannot use the project");
95 Console.WriteLine(
"WARNING: you can use the project but with some limitations");
99 Console.WriteLine(
"OK: you can use the project without any limitations");
114 Console.WriteLine(
"");
126 Console.WriteLine(
"Release SqueezeBrains library");
129 Console.WriteLine(
"Press ENTER to terminate");
135 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