static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //create instance of author repository list AuthorDb all = new AuthorDb(); //make GET requests and save author objects to author repository list CreateAuthorsList(all); //create the connection between the UI and the library DISocket.PlugSocket(); ILinqOperations operations = DISocket.Isocket; //run Form app Application.Run(new Form1(all, operations)); }
//connects the UI to the library by matching a plug instance to the interface socket public static void PlugSocket() { LinqOperations plug = new LinqOperations(); Isocket = plug; }
//form constructor public Form1(AuthorDb all, ILinqOperations operations) { InitializeComponent(); All = all; Operation = operations; }