private void Inject(WpdArchiveListing listing, WpdEntry[] fontEntries, WflContent[] fontContent) { UiInjectionManager manager = new UiInjectionManager(); using (MemoryInjectionSource source = new MemoryInjectionSource()) { String injectionRoot = Path.Combine(source.ProvideRootDirectory(), listing.ExtractionSubpath); for (int i = 0; i < fontEntries.Length; i++) { WpdEntry entry = fontEntries[i]; WflContent content = fontContent[i]; String injectionPath = Path.Combine(injectionRoot, entry.Name); MemoryStream stream = new MemoryStream(1024); source.RegisterStream(injectionPath, stream); WflFileWriter writer = new WflFileWriter(stream); writer.Write(content); stream.SetPosition(0); } UiWpdInjector injector = new UiWpdInjector(listing, fontEntries, false, source); injector.Inject(manager); } manager.WriteListings(); }
public static void InjectSingle(WpdArchiveListing listing, WpdEntry entry, MemoryStream output) { using (MemoryInjectionSource source = new MemoryInjectionSource()) { source.RegisterStream(String.Empty, output); UiWpdInjector injector = new UiWpdInjector(listing, new[] {entry}, false, source); UiInjectionManager manager = new UiInjectionManager(); injector.Inject(manager); manager.WriteListings(); } }
public static void InjectSingle(WpdArchiveListing listing, WpdEntry entry, MemoryStream output) { using (MemoryInjectionSource source = new MemoryInjectionSource()) { source.RegisterStream(String.Empty, output); UiWpdInjector injector = new UiWpdInjector(listing, new[] { entry }, false, source); UiInjectionManager manager = new UiInjectionManager(); injector.Inject(manager); manager.WriteListings(); } }
public void Inject(IUiInjectionSource source, UiInjectionManager manager) { using (UiWpdInjector injector = new UiWpdInjector(_listing, _leafs, _conversion, source)) injector.Inject(manager); }