TypeHelper.Resolver.AddSearchDirectory (Path.Combine (windir, @"Microsoft.NET\Framework\v4.0.30319"));
TypeHelper.Resolver.AddSearchDirectory (Path.Combine (windir, @"Microsoft.NET\Framework\v4.0.30319\WPF"));
}
+ } else {
+ TypeHelper.Resolver.AddSearchDirectory (Path.GetDirectoryName (arg));
}
-
}
}
AddAttribute (n, "value", "null");
continue;
}
+
string value = o.ToString ();
if (attName.EndsWith ("GuidAttribute"))
value = value.ToUpper ();
{
foreach (var named_argument in attribute.Properties) {
var name = named_argument.Name;
+ var arg = named_argument.Argument;
+
+ if (arg.Value is CustomAttributeArgument)
+ arg = (CustomAttributeArgument) arg.Value;
- mapping.Add (name, GetArgumentValue (named_argument.Argument.Type, named_argument.Argument.Value));
+ mapping.Add (name, GetArgumentValue (arg.Type, arg.Value));
}
}
if (!constructor.HasBody)
return;
+ // Custom handling for attributes with arguments which cannot be easily extracted
+ var ca = attribute.ConstructorArguments;
+ switch (constructor.DeclaringType.FullName) {
+ case "System.Runtime.CompilerServices.DecimalConstantAttribute":
+ var dca = constructor.Parameters[2].ParameterType == constructor.Module.TypeSystem.Int32 ?
+ new DecimalConstantAttribute ((byte) ca[0].Value, (byte) ca[1].Value, (int) ca[2].Value, (int) ca[3].Value, (int) ca[4].Value) :
+ new DecimalConstantAttribute ((byte) ca[0].Value, (byte) ca[1].Value, (uint) ca[2].Value, (uint) ca[3].Value, (uint) ca[4].Value);
+
+ mapping.Add ("Value", dca.Value);
+ return;
+ case "System.ComponentModel.BindableAttribute":
+ if (ca.Count != 1)
+ break;
+
+ if (constructor.Parameters[0].ParameterType == constructor.Module.TypeSystem.Boolean) {
+ mapping.Add ("Bindable", ca[0].Value);
+ } else {
+ throw new NotImplementedException ();
+ }
+
+ return;
+ }
+
var field_mapping = CreateArgumentFieldMapping (constructor);
var property_mapping = CreatePropertyFieldMapping ((TypeDefinition) constructor.DeclaringType);
if (!field_mapping.TryGetValue (pair.Value, out argument))
continue;
- var ca_arg = attribute.ConstructorArguments [argument];
+ var ca_arg = ca [argument];
+ if (ca_arg.Value is CustomAttributeArgument)
+ ca_arg = (CustomAttributeArgument) ca_arg.Value;
+
mapping.Add (pair.Key.Name, GetArgumentValue (ca_arg.Type, ca_arg.Value));
}
}
<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
<PropertyGroup>\r
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
<OutputType>Exe</OutputType>\r
<RootNamespace>mono_api_info</RootNamespace>\r
<AssemblyName>mono-api-info</AssemblyName>\r
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\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
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
<DebugSymbols>true</DebugSymbols>\r
<Compile Include="WellFormedXmlWriter.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
- <ProjectReference Include="..\..\class\Mono.Cecil\Mono.Cecil.csproj">\r
- <Project>{D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}</Project>\r
- <Name>Mono.Cecil-2008</Name>\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
+ <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
+ <ItemGroup>\r
+ <None Include="app.config" />\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