private static Assembly LoadMonoCecil() { using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Mono.Cecil.dll")) { return(Assembly.Load(EmbeddedAssemblyFinder.StreamToByteArray(stream))); } }
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)); } } } }