public DecompileType(ITypeDefinition type, DecompileModule module, List <IField> fields, List <IMethod> methods, List <IProperty> properties)
 {
     TypeDefinition = type;
     Module         = module;
     m_Fields       = fields;
     m_Methods      = methods;
     m_Properties   = properties;
 }
        private static void WriteProject(Options options, DecompileModule module, IEnumerable <DecompileModule> modules, string managedDir)
        {
            var project = module.Module.AssemblyName;

            using var sw = new StreamWriter($"{options.SolutionDirectoryName}/{project}/{project}.csproj");
            sw.WriteLine(@"<Project Sdk=""Microsoft.NET.Sdk"">");
            sw.WriteLine(@"  <PropertyGroup>");
            sw.WriteLine(@"    <TargetFramework>net47</TargetFramework>");
            sw.WriteLine(@"  </PropertyGroup>");

            sw.WriteLine(@"  <ItemGroup>");
            foreach (var item in module.References)
            {
                if (modules.Any(m => m.Module.AssemblyName == item.AssemblyName))
                {
                    sw.WriteLine($"    <ProjectReference Include=\"..\\{item.AssemblyName}\\{item.AssemblyName}.csproj\" />");
                }
            }
            sw.WriteLine(@"  </ItemGroup>");

            sw.WriteLine(@"  <ItemGroup>");
            sw.WriteLine($"    <Reference Include=\"UnityEngine.dll\">");
            sw.WriteLine($"      <HintPath>{managedDir}\\UnityEngine.dll</HintPath>");
            sw.WriteLine($"    </Reference>");
            foreach (var item in module.References)
            {
                if (!modules.Any(m => m.Module.AssemblyName == item.AssemblyName))
                {
                    sw.WriteLine($"    <Reference Include=\"{item.AssemblyName}\">");
                    sw.WriteLine($"      <HintPath>{managedDir}\\{item.AssemblyName}.dll</HintPath>");
                    sw.WriteLine($"    </Reference>");
                }
            }
            sw.WriteLine(@"  </ItemGroup>");

            sw.WriteLine(@"</Project>");
        }