Skip to content

Commit 57e9501

Browse files
lewurmjonpryor
authored andcommitted
[Java.Interop.Tools.Cecil] DirectoryAssemblyResolver.ToResolverCache returns a Dictionary (#152)
This is needed as part of [bumping xamarin-android to use mono/2017-06][0], to fix the following compilation error: Tasks/LinkAssemblies.cs(103,41): error CS1503: Argument 1: cannot convert from 'System.Collections.IDictionary' to 'System.Collections.Generic.Dictionary<string, Mono.Cecil.AssemblyDefinition>' [0]: dotnet/android#631
1 parent 689c752 commit 57e9501

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,9 @@ protected virtual void Dispose (bool disposing)
9696
cache = null;
9797
}
9898

99-
[Obsolete ("Should not be used; was required with previous Cecil versions.")]
100-
public IDictionary ToResolverCache ()
99+
public Dictionary<string, AssemblyDefinition> ToResolverCache ()
101100
{
102-
var resolver_cache = new Hashtable ();
103-
foreach (var pair in cache)
104-
resolver_cache.Add (pair.Key, pair.Value);
105-
106-
return resolver_cache;
101+
return new Dictionary<string, AssemblyDefinition>(cache);
107102
}
108103

109104
public virtual AssemblyDefinition Load (string fileName)

0 commit comments

Comments
 (0)