Example #1
0
        private static void AssertApiVersion()
        {
            string hash = CefApi.CefApiHash(CefApiHashType.Universal);

            if (CefApi.ApiHash.Equals(hash, StringComparison.OrdinalIgnoreCase))
            {
                return;
            }

            Version assemblyVersion = typeof(CefApi).Assembly.GetName().Version;

            throw new CefVersionMismatchException(string.Format(
                                                      "CEF runtime version mismatch. Loaded version API hash: '{0}', expected: '{1}' (CEF {2}.{3}).",
                                                      hash,
                                                      CefApi.ApiHash,
                                                      assemblyVersion.Major,
                                                      assemblyVersion.Minor
                                                      ));
        }