Beispiel #1
0
        public void GetWriterWhenNoResourceService()
        {
            RubyDesignerLoader loader = new RubyDesignerLoader(new MockDesignerGenerator());

            loader.BeginLoad(new MockDesignerLoaderHost());
            Assert.IsNull(loader.GetResourceWriter(CultureInfo.InvariantCulture));
        }
Beispiel #2
0
        public void Init()
        {
            host   = new MockDesignerLoaderHost();
            loader = new RubyDesignerLoader(new MockDesignerGenerator());
            loader.BeginLoad(host);

            textBox = (TextBox)loader.CreateComponent(typeof(TextBox), "textBox1");
            label   = (Label)loader.CreateComponent(typeof(Label), "label1");
            loader.Add(label, "label1");
        }
        public void Init()
        {
            host   = new MockDesignerLoaderHost();
            loader = new RubyDesignerLoader(new MockDesignerGenerator());
            loader.BeginLoad(host);

            DesignerSerializationManager designerSerializationManager = (DesignerSerializationManager)host.GetService(typeof(IDesignerSerializationManager));

            using (designerSerializationManager.CreateSession()) {
                listViewItem1 = (ListViewItem)loader.CreateInstance(typeof(ListViewItem), new object[0], "listViewItem1", false);
                instance      = loader.GetInstance("listViewItem1");
                typeName      = typeof(Int32).FullName;
                type          = loader.GetType(typeName);
            }
        }
Beispiel #4
0
        public void Init()
        {
            dummyReader     = new MockResourceReader();
            dummyWriter     = new MockResourceWriter();
            resourceService = new MockResourceService();
            resourceService.SetResourceReader(dummyReader);
            resourceService.SetResourceWriter(dummyWriter);
            host = new MockDesignerLoaderHost();
            host.AddService(typeof(IResourceService), resourceService);
            loader = new RubyDesignerLoader(new MockDesignerGenerator());
            loader.BeginLoad(host);

            reader = loader.GetResourceReader(CultureInfo.InvariantCulture) as MockResourceReader;
            writer = loader.GetResourceWriter(CultureInfo.InvariantCulture) as MockResourceWriter;
        }