private void ScanTranslators() { var types = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes().Where(xx => xx.IsClass && typeof(ITypeScriptPipelineTranslator).IsAssignableFrom(xx))); foreach (var type in types) { if (type == typeof(DefaultPipelineTranslator)) { continue; } ITypeScriptPipelineTranslator trans = (ITypeScriptPipelineTranslator)Activator.CreateInstance(type); trans.Prepare(this); } var defaultTrans = new DefaultPipelineTranslator(); defaultTrans.Prepare(this); }
public void AddTailTranslator(ITypeScriptPipelineTranslator trans) { translators.AddLast(trans); }
public void AddTranslator(ITypeScriptPipelineTranslator trans) { translators.AddFirst(trans); }