public void Inject()
        {
            System.Web.Mvc.DependencyResolver.SetResolver(new DependencyResolver());

            var test = new Test().Inject();

            Assert.NotNull(test.Enumerable1);
            Assert.Null(test.Enumerable2);
            Assert.Null(test.Object);

            // ReSharper disable once ExceptionNotDocumentedOptional
            Assert.NotNull(test.GetType().GetProperty("Enumerable3", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(test));
        }
示例#2
0
        //
        public static void Main2()
        {
            //iBonAuthenticate ibon = new iBonAuthenticate();

            int qq = 111;
            byte[] n1 = BitConverter.GetBytes(qq);
            int q2 =  BitConverter.ToInt32(n1, 0);
            string q3 = BitConverter.ToString(n1);
            Test myTest = new Test() { value1 = "Value 1", value2 = "Value 2" };
            XmlSerializer x = new XmlSerializer(myTest.GetType());
            x.Serialize(Console.Out, myTest);

            Console.ReadKey();
        }