private void Extract(IExtractable item, ExtractCounter counter) { try { switch (item.GetContentType()) { case 0: if (SaveImage(item)) { counter.Extracted++; } break; case 1: if (writeModelFileFunc != null && SaveModel(item)) { counter.Extracted++; } break; case 2: if (writeSoundFileFunc != null && SaveSound(item)) { counter.Extracted++; } break; } } catch (Exception e) { LogError($"Error extracting {item.DisplayName}", e); counter.Errors++; } }
public TeintureModif(IExtractable e) : base(0xE28) { Weight = 0.1; Name = "Essence " + e.getName; m_Couleur = e.getHue; Hue = Couleur; }
private bool SaveSound(IExtractable item) { ISoundContainer container; if (item.GetSoundContent(out container) && SaveSound(container, item.Destination)) { LogOutput($"Extracted {item.DisplayName}"); return(true); } return(false); }
private bool SaveModel(IExtractable item) { IRenderGeometry geometry; if (item.GetGeometryContent(out geometry) && SaveModel(geometry, item.Destination)) { LogOutput($"Extracted {item.DisplayName}"); return(true); } return(false); }
private bool SaveImage(IExtractable item) { IBitmap bitmap; if (item.GetBitmapContent(out bitmap) && SaveImage(bitmap, item.Destination)) { LogOutput($"Extracted {item.DisplayName}"); return(true); } return(false); }
private ExtractChainFactory(OSPlatform osplatform) { if (OSPlatform.Windows == osplatform) { WindowsExtractChain winChain = new WindowsExtractChain(); winChain.AddExtractor(new WinEnExtractChain()).AddExtractor(new WinChsExtractChain()); _chain = winChain; } else if (OSPlatform.Linux == osplatform) { _chain = null; throw new System.NotImplementedException(); } else { _chain = null; throw new System.NotImplementedException(); } }
public RawDocument(IExtractable extractor) { text = extractor.GetRawText (); format = ""; }
public static ETL Create(IExtractable extractionStage) { _extractionStage = extractionStage; return(new ETL()); }
/// <summary> /// 添加提取器 /// </summary> /// <param name="iextract"></param> /// <returns></returns> public WindowsExtractChain AddExtractor(IExtractable iextract) { chainList.Add(iextract); return(this); }