This commit is contained in:
Simon Egli 2017-02-16 00:11:45 +01:00 коммит произвёл Marek Safar
Родитель a92e04ffb4
Коммит cf38054f13
13 изменённых файлов: 71 добавлений и 39 удалений

Просмотреть файл

@ -37,7 +37,7 @@ namespace MoMA.Analyzer
public void FindPInvokesInAssembly (string assembly)
{
AssemblyDefinition ad = AssemblyFactory.GetAssembly (assembly);
AssemblyDefinition ad = AssemblyDefinition.ReadAssembly (assembly);
//Gets all types of the MainModule of the assembly
foreach (TypeDefinition type in ad.MainModule.Types) {

Просмотреть файл

@ -215,7 +215,7 @@ namespace MoMA.Analyzer
public static bool IsValidAssembly (string assembly)
{
try {
AssemblyFactory.GetAssembly (assembly);
AssemblyDefinition.ReadAssembly (assembly);
return true;
} catch {
return false;
@ -254,7 +254,7 @@ namespace MoMA.Analyzer
private void AnalyzeAssembly (string assembly)
{
AssemblyDefinition ad = AssemblyFactory.GetAssembly (assembly);
AssemblyDefinition ad = AssemblyDefinition.ReadAssembly (assembly);
assembly_version = ad.Name.Version;
AssemblyRuntime = ad.Runtime.ToString ();

Просмотреть файл

@ -35,7 +35,7 @@ namespace MoMA.Analyzer
// Leave any of the SortedList parameters null that you aren't interested in
public static void ExtractFromAssembly (string assembly, SortedList<string, Method> allMethods, SortedList<string, Method> throwsNotImplementedMethods, SortedList<string, Method> monoTodoMethods)
{
AssemblyDefinition ad = AssemblyFactory.GetAssembly (assembly);
AssemblyDefinition ad = AssemblyDefinition.ReadAssembly (assembly);
//Gets all types of the MainModule of the assembly
foreach (TypeDefinition type in ad.MainModule.Types) {

Просмотреть файл

@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -11,10 +12,9 @@
<AssemblyName>MoMA.Analyzer</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>moma.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
@ -36,18 +36,30 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=2.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files\Mono-1.2\lib\mono\2.0\ICSharpCode.SharpZipLib.dll</HintPath>
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net40\Mono.Cecil.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Cecil, Version=0.6.8.8607, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Mono\class\Mono.Cecil\bin\Release\Mono.Cecil.dll</HintPath>
<Reference Include="Mono.Cecil.Mdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Analysis\BaseChecker.cs" />
@ -88,6 +100,7 @@
</ItemGroup>
<ItemGroup>
<None Include="Web References\MoMAWebService\MoMASubmit.wsdl" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="moma.snk" />

Просмотреть файл

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -9,21 +9,21 @@
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.1433.
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.42000.
//
#pragma warning disable 1591
namespace MoMA.Analyzer.MoMAWebService {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Web.Services;
using System.Diagnostics;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
using System.ComponentModel;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1038.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="MoMASubmitSoap", Namespace="http://mono-project.com/MoMASubmit/")]
@ -153,11 +153,11 @@ namespace MoMA.Analyzer.MoMAWebService {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1038.0")]
public delegate void SubmitResultsCompletedEventHandler(object sender, SubmitResultsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1038.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SubmitResultsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -179,11 +179,11 @@ namespace MoMA.Analyzer.MoMAWebService {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1038.0")]
public delegate void GetLatestDefinitionsVersionCompletedEventHandler(object sender, GetLatestDefinitionsVersionCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.6.1038.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetLatestDefinitionsVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net40" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net45" />
</packages>

Просмотреть файл

@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,7 +13,7 @@
<ApplicationIcon>moma.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<StartupObject>MoMA.Program</StartupObject>

Просмотреть файл

@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>

Просмотреть файл

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EFB1C06D-B954-441C-8720-F4AA9E4C33F6}"
ProjectSection(SolutionItems) = preProject
MoMASubmitWebService\MoMASubmit.asmx = MoMASubmitWebService\MoMASubmit.asmx

Просмотреть файл

@ -7,10 +7,10 @@ namespace MoMAExtractor
{
static class AssemblyManager
{
private static string mono_20 = @"C:\Program Files (x86)\Mono-2.10\lib\mono\2.0";
private static string mono_30 = @"C:\Program Files (x86)\Mono-2.10\lib\mono\3.0";
private static string mono_35 = @"C:\Program Files (x86)\Mono-2.10\lib\mono\3.5";
private static string mono_40 = @"C:\Program Files (x86)\Mono-2.10\lib\mono\4.0";
private static string mono_20 = @"C:\Program Files (x86)\Mono\lib\mono\2.0";
private static string mono_30 = @"C:\Program Files (x86)\Mono\lib\mono\3.0";
private static string mono_35 = @"C:\Program Files (x86)\Mono\lib\mono\3.5";
private static string mono_40 = @"C:\Program Files (x86)\Mono\lib\mono\4.0";
private static string mono_droid = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoDroid\v2.0";
private static string net_20 = @"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727";

Просмотреть файл

@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -11,7 +12,7 @@
<AssemblyName>MoMAExtractor</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>

Просмотреть файл

@ -25,8 +25,8 @@ namespace MoMAExtractor
string output_path = Path.GetDirectoryName (Application.ExecutablePath);
// Get the assemblies we want to examine
List<string> mono_assemblies = AssemblyManager.GetAssemblies (true, use_20, use_30, use_35, use_design, mwf_only);
List<string> ms_assemblies = AssemblyManager.GetAssemblies (false, use_20, use_30, use_35, use_design, mwf_only);
List<string> mono_assemblies = AssemblyManager.GetAssemblies (true, use_20, use_30, use_35, false, false, use_design, mwf_only);
List<string> ms_assemblies = AssemblyManager.GetAssemblies (false, use_20, use_30, use_35, false, false, use_design, mwf_only);
StreamWriter sw = new StreamWriter (Path.Combine (output_path, "summary.txt"));

13
Properties/Resources.Designer.cs сгенерированный
Просмотреть файл

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -19,7 +19,7 @@ namespace MoMA.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -60,6 +60,9 @@ namespace MoMA.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mdicon {
get {
object obj = ResourceManager.GetObject("mdicon", resourceCulture);
@ -67,6 +70,9 @@ namespace MoMA.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap monoicon {
get {
object obj = ResourceManager.GetObject("monoicon", resourceCulture);
@ -74,6 +80,9 @@ namespace MoMA.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap start {
get {
object obj = ResourceManager.GetObject("start", resourceCulture);