예제 #1
0
        // c# generics are shit... where is automatically cast to object???
        public static Transformer getTransformer(Type type)
        {
            Transformer transformer = null;

            if (type == typeof(Collector))
            {
                transformer = new CollectorTransformer();
            }
            else if (type == typeof(Decision))
            {
                transformer = new DecisionTransformer();
            }
            else if (type == typeof(Destination))
            {
                transformer = new DestinationTransformer();
            }
            else if (type == typeof(sapr_sim.Figures.Parallel))
            {
                transformer = new ParallelTransformer();
            }
            else if (type == typeof(Procedure))
            {
                transformer = new ProcedureTransformer();
            }
            else if (type == typeof(Source))
            {
                transformer = new SourceTransformer();
            }
            else if (type == typeof(Sync))
            {
                transformer = new SynchronizationTransformer();
            }
            else if (type == typeof(SubDiagram))
            {
                transformer = new SubdiagramTransformer();
            }

            return(transformer);
        }
예제 #2
0
        private Expression TransformDst(Expression dst)
        {
            var dstTransformer = new DestinationTransformer(this);

            return(dst.Accept(dstTransformer));
        }