private static void CreateDesktopJsonFromPlist(string sourceFilename)
        {
            string projectDir = GenerateXmlFromGoogleServicesJson.GetProjectDir();
            string text       = Path.Combine(projectDir, sourceFilename);
            string text2      = Path.Combine(projectDir, GenerateXmlFromGoogleServicesJson.google_services_desktop_output_path);

            if (File.Exists(text2) && File.GetLastWriteTime(text2).CompareTo(File.GetLastWriteTime(text)) >= 0)
            {
                return;
            }
            if (GenerateXmlFromGoogleServicesJson.PrepareJsonDirectory())
            {
                CommandLine.Result result = GenerateXmlFromGoogleServicesJson.RunResourceGenerator(string.Concat(new string[]
                {
                    "-i \"",
                    text,
                    "\" -o \"",
                    text2,
                    "\" --plist"
                }), sourceFilename, false);
                if (result.exitCode != 0)
                {
                    Debug.LogError(DocStrings.DocRef.CouldNotTranslatePlist.Format(new object[]
                    {
                        sourceFilename
                    }));
                }
            }
        }
        private static void GenerateXmlResources(string googleServicesFile, bool ignoreModificationDate)
        {
            if (!GenerateXmlFromGoogleServicesJson.XMLGenerationEnabled)
            {
                return;
            }
            string projectDir = GenerateXmlFromGoogleServicesJson.GetProjectDir();
            string text       = Path.Combine(projectDir, GenerateXmlFromGoogleServicesJson.google_services_output_directory);

            if (!Directory.Exists(text))
            {
                try {
                    Directory.CreateDirectory(text);
                } catch (Exception exception) {
                    Debug.LogError(DocStrings.DocRef.GoogleServicesAndroidGenerationFailed.Format(new object[]
                    {
                        GenerateXmlFromGoogleServicesJson.google_services_output_path,
                        googleServicesFile,
                        DocStrings.DocRef.UnableToCreateDirectory.Format(new object[]
                        {
                            text
                        }),
                        string.Empty
                    }));
                    Debug.LogException(exception);
                    return;
                }
            }
            string text2 = Path.Combine(projectDir, googleServicesFile);
            string text3 = Path.Combine(projectDir, GenerateXmlFromGoogleServicesJson.google_services_output_path);

            if (!ignoreModificationDate && File.Exists(text3) && File.GetLastWriteTime(text3).CompareTo(File.GetLastWriteTime(text2)) >= 0)
            {
                return;
            }
            GenerateXmlFromGoogleServicesJson.RunResourceGenerator(string.Concat(new string[]
            {
                "-i \"",
                text2,
                "\" -o \"",
                text3,
                "\" -p \"",
                UnityCompat.ApplicationId,
                "\""
            }), text2, true);
        }
        private static Dictionary <string, string> ReadProjectFields(string googleServicesFile)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            CommandLine.Result result = GenerateXmlFromGoogleServicesJson.RunResourceGenerator("-i \"" + googleServicesFile + "\" -f", googleServicesFile, false);
            if (result.exitCode == 0)
            {
                string[] array = result.stdout.Split(GenerateXmlFromGoogleServicesJson.newline_chars);
                for (int i = 0; i < array.Length; i++)
                {
                    string   text   = array[i];
                    string[] array2 = text.Split(GenerateXmlFromGoogleServicesJson.field_delimiter);
                    if (array2.Length == 2)
                    {
                        dictionary[array2[0]] = array2[1];
                    }
                }
            }
            return(dictionary);
        }
        private static List <string> ReadBundleIds(string googleServicesFile)
        {
            string str = (!GenerateXmlFromGoogleServicesJson.IsFileOfType(googleServicesFile, GenerateXmlFromGoogleServicesJson.ConfigFileType.Plist)) ? string.Empty : " --plist";
            SortedDictionary <string, string> sortedDictionary = new SortedDictionary <string, string>();

            CommandLine.Result result = GenerateXmlFromGoogleServicesJson.RunResourceGenerator("-i \"" + googleServicesFile + "\" -l" + str, googleServicesFile, false);
            if (result.exitCode == 0)
            {
                string[] array = result.stdout.Split(GenerateXmlFromGoogleServicesJson.newline_chars);
                for (int i = 0; i < array.Length; i++)
                {
                    string text = array[i];
                    if (!string.IsNullOrEmpty(text))
                    {
                        sortedDictionary[text] = text;
                    }
                }
            }
            return(new List <string>(sortedDictionary.Keys));
        }