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

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

Initializes and activates the AwesomiumResolverService.
/// A null reference or an empty string specified for . /// /// The directory specified does not exist or it does not contain the /// necessary Awesomium.NET assemblies. ///
public static Initialize ( string directoryPath ) : void
directoryPath string /// The path to the directory containing the Awesomium.NET assemblies /// and its native Awesomium 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 Awesomium.NET assemblies", nameof(directoryPath));
            }

            _awesomiumPath = directoryPath;
            AppDomain.CurrentDomain.AssemblyResolve += ResolveAwesomium;

            Logging.Write(directoryPath);
        }