You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
585 B

  1. #nullable enable
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace IPA.AntiMalware
  8. {
  9. public static class AntiMalwareEngine
  10. {
  11. public static IAntiMalware Engine { get; } = InitializeEngine();
  12. private static IAntiMalware InitializeEngine()
  13. {
  14. IAntiMalware? engine = null;
  15. #if !NET35
  16. engine = WindowsAntiMalware.TryInitialize();
  17. #endif
  18. engine ??= new NoopAntiMalware();
  19. return engine;
  20. }
  21. }
  22. }