예제 #1
0
        public void Setup()
        {
            mr               = new MockRepository();
            codeViewer       = new CodeViewerPane();
            decompilerSvc    = mr.Stub <IDecompilerService>();
            decompiler       = mr.Stub <IDecompiler>();
            uiPreferencesSvc = mr.Stub <IUiPreferencesService>();
            uiSvc            = mr.Stub <IDecompilerShellUiService>();
            font             = new Font("Arial", 10);
            var sc = new ServiceContainer();

            decompilerSvc.Decompiler = decompiler;
            sc.AddService <IDecompilerService>(decompilerSvc);
            sc.AddService <IUiPreferencesService>(uiPreferencesSvc);
            sc.AddService <IDecompilerShellUiService>(uiSvc);
            codeViewer.SetSite(sc);
        }
예제 #2
0
        public void Setup()
        {
            mr               = new MockRepository();
            program          = new Program();
            codeViewer       = new CodeViewerPane();
            decompilerSvc    = mr.Stub <IDecompilerService>();
            decompiler       = mr.Stub <IDecompiler>();
            uiPreferencesSvc = mr.Stub <IUiPreferencesService>();
            uiSvc            = mr.Stub <IDecompilerShellUiService>();
            frame            = mr.Stub <IWindowFrame>();
            font             = new Font("Arial", 10);
            var styles = new Dictionary <string, UiStyle>();

            uiPreferencesSvc.Stub(u => u.Styles).Return(styles);

            var sc = new ServiceContainer();

            decompilerSvc.Decompiler = decompiler;
            sc.AddService <IDecompilerService>(decompilerSvc);
            sc.AddService <IUiPreferencesService>(uiPreferencesSvc);
            sc.AddService <IDecompilerShellUiService>(uiSvc);
            codeViewer.SetSite(sc);
        }