Exemple #1
0
        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);
        }
Exemple #2
0
 public void AddTailTranslator(ITypeScriptPipelineTranslator trans)
 {
     translators.AddLast(trans);
 }
Exemple #3
0
 public void AddTranslator(ITypeScriptPipelineTranslator trans)
 {
     translators.AddFirst(trans);
 }