private static void CheckSdkVersion()

in Source/Assets/AppCenterEditorExtensions/Editor/Scripts/Panels/AppCenterEditorSDKTools.cs [508:558]


        private static void CheckSdkVersion()
        {
            if (!string.IsNullOrEmpty(InstalledSdkVersion))
                return;

            var packageTypes = new Dictionary<AppCenterSDKPackage, Type>();
            foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                try
                {
                    foreach (var type in assembly.GetTypes())
                    {
                        if (type.FullName == Constants.WrapperSdkClassName)
                        {
                            foreach (var field in type.GetFields())
                            {
                                if (field.Name == Constants.WrapperSdkVersionFieldName)
                                {
                                    InstalledSdkVersion = field.GetValue(field).ToString();
                                    break;
                                }
                            }
                        }
                        else
                        {
                            foreach (var package in AppCenterSDKPackage.SupportedPackages)
                            {
                                if (type.FullName == package.TypeName)
                                {
                                    package.IsInstalled = true;
                                    packageTypes[package] = type;
                                }
                            }
                        }
                    }
                }
                catch (ReflectionTypeLoadException)
                {
                    // For this failure, silently skip this assembly unless we have some expectation that it contains App Center
                    if (assembly.FullName.StartsWith("Assembly-CSharp")) // The standard "source-code in unity proj" assembly name
                    {
                        EdExLogger.LoggerInstance.LogWarning("App Center Editor Extension error, failed to access the main CSharp assembly that probably contains App Center SDK");
                    }
                    continue;
                }
            }
            foreach (var packageType in packageTypes)
            {
                packageType.Key.GetInstalledVersion(packageType.Value, InstalledSdkVersion);
            }
        }