コード例 #1
0
ファイル: Program.cs プロジェクト: ishakdolek/GrpcDemo
        private static UserModelResult CreateUserDetailTest(User.UserClient client)
        {
            var phones = new RepeatedField <UserPhone>
            {
                new UserPhone {
                    Fax = "1", Skypeid = "S1"
                },
                new UserPhone {
                    Fax = "2", Skypeid = "S2"
                },
                new UserPhone {
                    Fax = "3", Skypeid = "S3"
                },
            };

            return(client.CreateUserDetail(new UserDetail
            {
                Usermodel = new UserModel
                {
                    Age = 21,
                    Adress = "Subu 2",
                    Name = "ishakdolek"
                },
                Uphone =
                {
                    new UserPhone {
                        Fax = "1", Skypeid = "S1"
                    },
                    new UserPhone {
                        Fax = "2", Skypeid = "S2"
                    },
                    new UserPhone {
                        Fax = "3", Skypeid = "S3"
                    },
                }

                //Phone = new RepeatedField<Phone>()
            }));
        }