Пример #1
0
    public static void ProcessStart(Queue <Message> q)
    {
        Console.Write("Enter the type of message. \n1 for cal:\n2 for cfg:\n3 for showing the state:\n");
        string selection = Console.ReadLine();

        Console.WriteLine("Enter the value of the resource : ");

        ProcessorProvider provider = new ProcessorProvider();

        var recv = provider.GetProcessor(selection);

        recv.InitializeProcess(q, selection);
    }
Пример #2
0
        /// <summary>
        /// This method configures a default processor.
        /// </summary>
        public static IProcessor <Assembly, TPrinter> Configure <TPrinter>()
            where TPrinter : IPlantUmlPrinter
        {
            ProcessorProvider <TPrinter> provider = new ProcessorProvider <TPrinter>();

            provider.Register(new PUAssemblyProcessor <TPrinter>(provider).CheckInDiagram());
            provider.Register(new PUClassProcessor <TPrinter>(provider).CheckInDiagram());
            provider.Register(new PUConstructorProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUMethodProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUPropertyProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUFieldProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUEventProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUGeneralizationProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUAssociationProcessor <TPrinter>().CheckInDiagram());
            provider.Register(new PUDependencyProcessor <TPrinter>().CheckInDiagram());

            return(provider.GetProcessor <Assembly>());
        }