method.Name = "~" + name;
}
- // TODO: Better check
- if (t != type && list.Any (l => l.DeclaringType != method.DeclaringType && l.Name == method.Name && l.Parameters.Count == method.Parameters.Count))
+ if (t != type && list.Any (l => l.DeclaringType != method.DeclaringType && l.Name == method.Name && l.Parameters.Count == method.Parameters.Count &&
+ l.Parameters.SequenceEqual (method.Parameters, new ParameterComparer ())))
continue;
list.Add (method);
if (!fullAPI)
break;
- if (!t.IsInterface || t.IsEnum)
+ if (t.IsInterface || t.IsEnum)
break;
if (t.BaseType == null || t.BaseType.FullName == "System.Object")
return list.ToArray ();
}
+ sealed class ParameterComparer : IEqualityComparer<ParameterDefinition>
+ {
+ public bool Equals (ParameterDefinition x, ParameterDefinition y)
+ {
+ return x.ParameterType.Name == y.ParameterType.Name;
+ }
+
+ public int GetHashCode (ParameterDefinition obj)
+ {
+ return obj.ParameterType.Name.GetHashCode ();
+ }
+ }
+
static bool IsFinalizer (MethodDefinition method)
{
if (method.Name != "Finalize")
ParameterDefinition info = infos [i];
- string modifier;
- if ((info.Attributes & ParameterAttributes.In) != 0)
- modifier = "in";
- else if ((info.Attributes & ParameterAttributes.Out) != 0)
- modifier = "out";
- else
- modifier = string.Empty;
+ if (info.ParameterType.IsByReference) {
+ string modifier;
+ if ((info.Attributes & (ParameterAttributes.Out | ParameterAttributes.In)) == ParameterAttributes.Out)
+ modifier = "out";
+ else
+ modifier = "ref";
- if (modifier.Length > 0) {
signature.Append (modifier);
signature.Append (" ");
}
<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
<PropertyGroup>\r
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
- <ProductVersion>8.0.30703</ProductVersion>\r
- <SchemaVersion>2.0</SchemaVersion>\r
- <ProjectGuid>{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}</ProjectGuid>\r
+ <ProjectGuid>{804E854F-E8F5-4E2B-807A-4FAF4BE99C03}</ProjectGuid>\r
<OutputType>Exe</OutputType>\r
<RootNamespace>mono_api_info</RootNamespace>\r
<AssemblyName>mono-api-info</AssemblyName>\r
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
- <FileAlignment>512</FileAlignment>\r
- <FileUpgradeFlags>\r
- </FileUpgradeFlags>\r
- <UpgradeBackupLocation>\r
- </UpgradeBackupLocation>\r
- <OldToolsVersion>3.5</OldToolsVersion>\r
- <PublishUrl>publish\</PublishUrl>\r
- <Install>true</Install>\r
- <InstallFrom>Disk</InstallFrom>\r
- <UpdateEnabled>false</UpdateEnabled>\r
- <UpdateMode>Foreground</UpdateMode>\r
- <UpdateInterval>7</UpdateInterval>\r
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r
- <UpdatePeriodically>false</UpdatePeriodically>\r
- <UpdateRequired>false</UpdateRequired>\r
- <MapFileExtensions>true</MapFileExtensions>\r
- <ApplicationRevision>0</ApplicationRevision>\r
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r
- <IsWebBootstrapper>false</IsWebBootstrapper>\r
- <UseApplicationTrust>false</UseApplicationTrust>\r
- <BootstrapperEnabled>true</BootstrapperEnabled>\r
- <TargetFrameworkProfile />\r
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+ <ProductVersion>8.0.30703</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<Reference Include="System" />\r
<Reference Include="System.Core" />\r
<Reference Include="System.Xml" />\r
+ <Reference Include="Mono.Cecil">\r
+ <HintPath>..\..\class\lib\net_4_x\Mono.Cecil.dll</HintPath>\r
+ </Reference>\r
</ItemGroup>\r
<ItemGroup>\r
<Compile Include="AssemblyResolver.cs" />\r
<Link>Options.cs</Link>\r
</Compile>\r
</ItemGroup>\r
- <ItemGroup>\r
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">\r
- <Visible>False</Visible>\r
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>\r
- <Install>false</Install>\r
- </BootstrapperPackage>\r
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">\r
- <Visible>False</Visible>\r
- <ProductName>.NET Framework 3.5 SP1</ProductName>\r
- <Install>true</Install>\r
- </BootstrapperPackage>\r
- </ItemGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
<Target Name="AfterBuild">\r
</Target>\r
-->\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\..\external\cecil\Mono.Cecil.csproj">\r
- <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>\r
- <Name>Mono.Cecil</Name>\r
- </ProjectReference>\r
- </ItemGroup>\r
</Project>
\ No newline at end of file