コード例 #1
0
        public void WriteResults()
        {
            string typeMapPath = CppParseManager.CreateAnalyticsFilePath("CppTypeMap.json");

            string jsonData = JsonConvert.SerializeObject(this.TypeMap, Formatting.Indented);

            File.WriteAllText(typeMapPath, jsonData);

            string classMapPath = CppParseManager.CreateAnalyticsFilePath("CppClassMap.json");

            jsonData = JsonConvert.SerializeObject(this.ClassMap, Formatting.Indented);

            File.WriteAllText(classMapPath, jsonData);

            string typeBindingPath = CppParseManager.CreateAnalyticsFilePath("WidgetTypeBindings.json");

            jsonData = JsonConvert.SerializeObject(this.DialogTypeBindings, Formatting.Indented);

            File.WriteAllText(typeBindingPath, jsonData);

            /*
             * string missingRefMapPath = CppParseManager.CreateAnalyticsFilePath("MissingRefClassNames.json");
             *
             * jsonData = JsonConvert.SerializeObject(this.MissingRefClassNames, Formatting.Indented);
             *
             * File.WriteAllText(missingRefMapPath, jsonData);
             *
             * string missingDefMapPath = CppParseManager.CreateAnalyticsFilePath("MissingDefClassNames.json");
             *
             * jsonData = JsonConvert.SerializeObject(this.MissingDefClassNames, Formatting.Indented);
             *
             * File.WriteAllText(missingDefMapPath, jsonData);
             */
        }
コード例 #2
0
        public void WriteFileAnalytics()
        {
            string filePath = CppParseManager.CreateAnalyticsFilePath(this.CppCodeContext.DialogClassName, "WidgetTypeBindings.json");

            string jsonData = JsonConvert.SerializeObject(this.WidgetTypeBindingsMap, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);
        }
コード例 #3
0
        public static void WriteAnalytics()
        {
            string filePath = CppParseManager.CreateAnalyticsFilePath("ClassMethodSchemaMap.json");

            string jsonData = JsonConvert.SerializeObject(ClassMethodSchemaMap, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);

            filePath = CppParseManager.CreateAnalyticsFilePath("HasCreateList.json");

            jsonData = JsonConvert.SerializeObject(HasCreateList, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);

            filePath = CppParseManager.CreateAnalyticsFilePath("IncompleteBindings.json");

            jsonData = JsonConvert.SerializeObject(IncompleteWidgetTypeBindings, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);

            filePath = CppParseManager.CreateAnalyticsFilePath("HasBindings.json");

            jsonData = JsonConvert.SerializeObject(HasBindings, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);

            filePath = CppParseManager.CreateAnalyticsFilePath("DDXMethods.json");

            jsonData = JsonConvert.SerializeObject(DDXMethods, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);

            SortedDictionary <string, DDXMethods> dDXMethodsSchemaSummary = new SortedDictionary <string, DDXMethods>();

            foreach (var dDXMethodSchemaItem in DDXMethods)
            {
                var newSummary = new DDXMethods()
                {
                    MethodName = dDXMethodSchemaItem.Value.MethodName
                };

                foreach (var typeItem in dDXMethodSchemaItem.Value.TypeList)
                {
                    newSummary.TypeList.Add(typeItem.Key, typeItem.Value);
                }

                dDXMethodsSchemaSummary.Add(dDXMethodSchemaItem.Key, newSummary);
            }

            filePath = CppParseManager.CreateAnalyticsFilePath("DDXMethodsSummary.json");

            jsonData = JsonConvert.SerializeObject(dDXMethodsSchemaSummary, Formatting.Indented);

            File.WriteAllText(filePath, jsonData);
        }
コード例 #4
0
        public void SaveClassInfo()
        {
            string classInfoPath = CppParseManager.CreateAnalyticsFilePath(this.DialogClassName, $"ClassMap.json");

            if (CppResultsManager.Self.ClassMap.ContainsKey(this.DialogClassName))
            {
                CppClassResult cppClassResult = CppResultsManager.Self.ClassMap[this.DialogClassName];

                string jsonData = JsonConvert.SerializeObject(cppClassResult, Formatting.Indented);

                File.WriteAllText(classInfoPath, jsonData);

                CppResultsManager.Self.ClassMap.Remove(this.DialogClassName);
            }
        }