/// <summary> /// Write information about this binary to a JSON file /// </summary> /// <param name="Writer">Writer for this binary's data</param> public virtual void ExportJson(JsonWriter Writer) { Writer.WriteValue("Name", Name); Writer.WriteValue("Type", Type.ToString()); Writer.WriteValue("Directory", ModuleDirectory.FullName); Writer.WriteValue("Rules", RulesFile.FullName); Writer.WriteValue("PCHUsage", Rules.PCHUsage.ToString()); if (Rules.PrivatePCHHeaderFile != null) { Writer.WriteValue("PrivatePCH", FileReference.Combine(ModuleDirectory, Rules.PrivatePCHHeaderFile).FullName); } if (Rules.SharedPCHHeaderFile != null) { Writer.WriteValue("SharedPCH", FileReference.Combine(ModuleDirectory, Rules.SharedPCHHeaderFile).FullName); } ExportJsonModuleArray(Writer, "PublicDependencyModules", PublicDependencyModules); ExportJsonModuleArray(Writer, "PublicIncludePathModules", PublicIncludePathModules); ExportJsonModuleArray(Writer, "PrivateDependencyModules", PrivateDependencyModules); ExportJsonModuleArray(Writer, "PrivateIncludePathModules", PrivateIncludePathModules); ExportJsonModuleArray(Writer, "DynamicallyLoadedModules", DynamicallyLoadedModules); Writer.WriteArrayStart("CircularlyReferencedModules"); foreach (string ModuleName in Rules.CircularlyReferencedDependentModules) { Writer.WriteValue(ModuleName); } Writer.WriteArrayEnd(); }
/// <summary> /// Write information about this binary to a JSON file /// </summary> /// <param name="Writer">Writer for this binary's data</param> public virtual void ExportJson(JsonWriter Writer) { Writer.WriteValue("Name", Name); Writer.WriteValue("Type", Type.ToString()); Writer.WriteValue("Directory", ModuleDirectory.FullName); Writer.WriteValue("Rules", RulesFile.FullName); Writer.WriteValue("PCHUsage", Rules.PCHUsage.ToString()); if (Rules.PrivatePCHHeaderFile != null) { Writer.WriteValue("PrivatePCH", FileReference.Combine(ModuleDirectory, Rules.PrivatePCHHeaderFile).FullName); } if (Rules.SharedPCHHeaderFile != null) { Writer.WriteValue("SharedPCH", FileReference.Combine(ModuleDirectory, Rules.SharedPCHHeaderFile).FullName); } ExportJsonModuleArray(Writer, "PublicDependencyModules", PublicDependencyModules); ExportJsonModuleArray(Writer, "PublicIncludePathModules", PublicIncludePathModules); ExportJsonModuleArray(Writer, "PrivateDependencyModules", PrivateDependencyModules); ExportJsonModuleArray(Writer, "PrivateIncludePathModules", PrivateIncludePathModules); ExportJsonModuleArray(Writer, "DynamicallyLoadedModules", DynamicallyLoadedModules); ExportJsonStringArray(Writer, "PublicSystemIncludePaths", PublicSystemIncludePaths.Select(x => x.FullName)); ExportJsonStringArray(Writer, "PublicIncludePaths", PublicIncludePaths.Select(x => x.FullName)); ExportJsonStringArray(Writer, "PrivateIncludePaths", PrivateIncludePaths.Select(x => x.FullName)); ExportJsonStringArray(Writer, "PublicLibraryPaths", PublicLibraryPaths.Select(x => x.FullName)); ExportJsonStringArray(Writer, "PublicAdditionalLibraries", PublicAdditionalLibraries); ExportJsonStringArray(Writer, "PublicFrameworks", PublicFrameworks); ExportJsonStringArray(Writer, "PublicWeakFrameworks", PublicWeakFrameworks); ExportJsonStringArray(Writer, "PublicDelayLoadDLLs", PublicDelayLoadDLLs); ExportJsonStringArray(Writer, "PublicDefinitions", PublicDefinitions); Writer.WriteArrayStart("CircularlyReferencedModules"); foreach (string ModuleName in Rules.CircularlyReferencedDependentModules) { Writer.WriteValue(ModuleName); } Writer.WriteArrayEnd(); Writer.WriteArrayStart("RuntimeDependencies"); foreach (RuntimeDependency RuntimeDependency in RuntimeDependencies) { Writer.WriteObjectStart(); Writer.WriteValue("Path", RuntimeDependency.Path.FullName); Writer.WriteValue("Type", RuntimeDependency.Type.ToString()); Writer.WriteObjectEnd(); } Writer.WriteArrayEnd(); }