示例#1
0
 private static Assembly LoadMonoCecil()
 {
     using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Mono.Cecil.dll"))
     {
         return(Assembly.Load(EmbeddedAssemblyFinder.StreamToByteArray(stream)));
     }
 }
示例#2
0
 private static IEnumerable <byte[]> GetEmbeddedResourcesBytes(Assembly assembly)
 {
     foreach (var resourceName in assembly.GetManifestResourceNames())
     {
         if (EmbeddedAssemblyFinder.IsEmbeddedResource(assembly, resourceName))
         {
             using (var resourceStream = assembly.GetManifestResourceStream(resourceName))
             {
                 yield return(EmbeddedAssemblyFinder.StreamToByteArray(resourceStream));
             }
         }
     }
 }