electrolobzik
02/09/2024, 1:34 PMexpect class and an interface, defined in the common part? It looks like in both cases I can define signature in the common code and then implement platform specific implementation. What is the main point of using expect class instead?Javier
02/09/2024, 1:35 PMelectrolobzik
02/09/2024, 1:37 PMAlexander Zhirkevich
02/09/2024, 1:41 PMPamela Hill
02/09/2024, 1:43 PMPamela Hill
02/09/2024, 1:44 PMelectrolobzik
02/09/2024, 1:45 PMContext or something like that. I don’t understand if are there any advantages of expect class over regular interface in this case.Pamela Hill
02/09/2024, 1:46 PMelectrolobzik
02/09/2024, 1:50 PMelectrolobzik
02/09/2024, 1:52 PMelectrolobzik
02/09/2024, 1:59 PMexpect class is the case, when one needs to instantiate the class inside the common code and DI is not possible or convenient (like creating exception). In all other cases when we can inject platform-specific implementation into the common code or are creating the instance in the platform code it is much correct to use interfaces.electrolobzik
02/09/2024, 2:24 PMelectrolobzik
02/09/2024, 2:24 PMexpect class here.electrolobzik
02/09/2024, 2:29 PMexpect class . There is a pretty nice support from the IDE side when we use them instead of interfaces: one can see if the class has or not implementations on all platforms and allows to quickly create one, creating all required directories and files.Vladimir Vainer
08/11/2024, 11:27 AM