AcManager.Controls.Helpers.CefSharpResolverService.Initialize C# (CSharp) Метод

Initialize() публичный статический Метод

Initializes and activates the CefSharpResolverService.
/// A null reference or an empty string specified for . /// /// The directory specified does not exist or it does not contain the /// necessary CefSharp assemblies. ///
public static Initialize ( string directoryPath ) : void
directoryPath string /// The path to the directory containing the CefSharp assemblies /// and its native references. ///
Результат void
        public static void Initialize(string directoryPath) {
            if (string.IsNullOrEmpty(directoryPath)) {
                throw new ArgumentNullException(nameof(directoryPath));
            }

            if (!directoryPath.EndsWith(Path.DirectorySeparatorChar.ToString())) {
                directoryPath += Path.DirectorySeparatorChar;
            }

            var dllPath = $"{directoryPath}{Dependencies[0]}{DllExtension}";
            if (!File.Exists(dllPath)) {
                throw new ArgumentException("The directory specified does not contain the CefSharp assemblies", nameof(directoryPath));
            }

            _cefSharpPath = directoryPath;
            AppDomain.CurrentDomain.AssemblyResolve += ResolveCefSharp;
            Logging.Write(directoryPath);
        }