Esempio n. 1
0
    // CTOR

    public ServiceProvider()
    {
#if STEAM
        m_Impl = new SteamServiceProviderImpl();
#else
        m_Impl = new NullServiceProviderImpl();
#endif
    }
Esempio n. 2
0
            public void CallHandleProperty()
            {
                IServiceProviderImpl provider = new IServiceProviderImpl();

                string str = new string('a', 1);

                HandleProperty("length", provider, ref str, true);
            }
Esempio n. 3
0
        public void ApplicationResourcePathExtensionProvideValue()
        {
            tlog.Debug(tag, $"ApplicationResourcePathExtensionProvideValue START");

            try
            {
                IServiceProviderImpl serviceProviderimplement = new IServiceProviderImpl();
                Assert.IsNotNull(serviceProviderimplement, "null IServiceProviderImpl");
                path.ProvideValue(serviceProviderimplement);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"ApplicationResourcePathExtensionProvideValue END");
        }
Esempio n. 4
0
        public void MarkupExtensionParserParse()
        {
            tlog.Debug(tag, $"MarkupExtensionParserParse START");

            try
            {
                string str = new string('a', 4);
                IServiceProviderImpl provider = new IServiceProviderImpl();
                Assert.IsNotNull(provider, "null IServiceProviderImplement");
                extParser.Parse("myMatch", ref str, provider);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"MarkupExtensionParserParse END");
        }
Esempio n. 5
0
        public void MarkupExtensionParserParse3()
        {
            tlog.Debug(tag, $"MarkupExtensionParserParse3 START");

            try
            {
                string str = "{Binding Red}";
                IServiceProviderImpl provider = new IServiceProviderImpl();
                Assert.IsNotNull(provider, "null IServiceProviderImplement");
                string str3 = "}";
                extParser.Parse("StaticResource", ref str3, provider);
            }
            catch (XamlParseException e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.True(true, $"Should caught Exception {e.Message.ToString()}");
            }

            tlog.Debug(tag, $"MarkupExtensionParserParse3 END");
        }
Esempio n. 6
0
        public void MarkupExtensionParserParse2()
        {
            tlog.Debug(tag, $"MarkupExtensionParserParse2 START");

            try
            {
                string str = "{Binding Red}";
                IServiceProviderImpl provider = new IServiceProviderImpl();
                Assert.IsNotNull(provider, "null IServiceProviderImplement");
                extParser.Parse("Binding", ref str, provider);
                string str2 = "{TemplateBinding Red}";
                extParser.Parse("TemplateBinding", ref str2, provider);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"MarkupExtensionParserParse2 END");
        }
Esempio n. 7
0
        public void ArrayExtensionProvideValue()
        {
            tlog.Debug(tag, $"ArrayExtensionProvideValue START");

            try
            {
                IServiceProviderImpl serviceProviderimplement = new IServiceProviderImpl();
                Assert.IsNotNull(serviceProviderimplement, "null IServiceProviderimplement");
                Assert.IsInstanceOf <IServiceProviderImpl>(serviceProviderimplement, "Should return IServiceProviderImpl instance.");
                array.Items.Add("string");
                array.Type = typeof(string);

                array.ProvideValue(serviceProviderimplement);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"ArrayExtensionProvideValue END");
        }