예제 #1
0
 protected override void Initialize(HttpControllerContext controllerContext)
 {
     base.Initialize(controllerContext);
     StaticValueProviderFactory.Clear();
     StaticValueProviderFactory.Add("Name", "张三");
     StaticValueProviderFactory.Add("PhoneNo", "18949881803");
     StaticValueProviderFactory.Add("EmailAddress", "*****@*****.**");
     StaticValueProviderFactory.Add("Address.Province", "安徽省");
     StaticValueProviderFactory.Add("Address.City", "合肥");
     StaticValueProviderFactory.Add("Address.District", "庐阳产业园");
     StaticValueProviderFactory.Add("Address.Street", "阜阳路1008号");
 }
예제 #2
0
        protected override void Initialize(HttpControllerContext controllerContext)
        {
            base.Initialize(controllerContext);

            StaticValueProviderFactory.Clear();
            StaticValueProviderFactory.Add("Name", "张三");
            StaticValueProviderFactory.Add("PhoneNo", "123456789");
            StaticValueProviderFactory.Add("EmailAddress", "*****@*****.**");
            StaticValueProviderFactory.Add("Address.Province", "江苏省");
            StaticValueProviderFactory.Add("Address.City", "苏州市");
            StaticValueProviderFactory.Add("Address.District", "工业园区");
            StaticValueProviderFactory.Add("Address.Street", "星湖街328号");
        }
        protected override void Initialize(HttpControllerContext controllerContext)
        {
            base.Initialize(controllerContext);

            StaticValueProviderFactory.Clear();

            StaticValueProviderFactory.Add("[0].Name", "张三");
            StaticValueProviderFactory.Add("[0].PhoneNo", "123");
            StaticValueProviderFactory.Add("[0].EmailAddress", "*****@*****.**");

            StaticValueProviderFactory.Add("[1].Name", "李四");
            StaticValueProviderFactory.Add("[1].PhoneNo", "456");
            StaticValueProviderFactory.Add("[1].EmailAddress", "*****@*****.**");

            StaticValueProviderFactory.Add("[2].Name", "王五");
            StaticValueProviderFactory.Add("[2].PhoneNo", "789");
            StaticValueProviderFactory.Add("[2].EmailAddress", "*****@*****.**");
        }