Imported Upstream version 3.10.0

Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
Jo Shields
2014-10-04 11:27:48 +01:00
parent fe777c5c82
commit 8b9b85e7f5
970 changed files with 20242 additions and 31308 deletions

View File

@@ -157,6 +157,22 @@ namespace Mono.Cecil {
}
}
interface ICustomMetadataWriter
{
/*
* Remap TypeReference or create custom TypeRef token.
*
* Return true to use the returned custom 'token'.
*
* Return false to create a TypeRef token for 'type'
* (which may have been replaced with a different TypeReference).
*
* This is necessary when types are moved from one assembly to another
* to either adjust the scope or replace a TypeRef with a TypeDef token.
*/
bool CreateTypeRefToken (ref TypeReference type, out MetadataToken token);
}
public sealed class WriterParameters {
Stream symbol_stream;
@@ -216,6 +232,7 @@ namespace Mono.Cecil {
#if !READ_ONLY
MetadataImporter importer;
ICustomMetadataWriter custom_writer;
#endif
Collection<CustomAttribute> custom_attributes;
Collection<AssemblyNameReference> references;
@@ -286,6 +303,18 @@ namespace Mono.Cecil {
internal MetadataImporter MetadataImporter {
get { return importer ?? (importer = new MetadataImporter (this)); }
}
internal void SetMetadataImporter (MetadataImporter importer)
{
if (this.importer != null)
throw new InvalidOperationException ();
this.importer = importer;
}
internal ICustomMetadataWriter CustomMetadataWriter {
get { return custom_writer; }
set { custom_writer = value; }
}
#endif
public IAssemblyResolver AssemblyResolver {