public FsCustomer GetCustomer(FsCustomerId id)
        {
            var name   = FsCustomerName.NewFsCustomerName("Alice");
            var fsCust = new FsCustomer(id, name);

            return(fsCust);
        }
コード例 #2
0
        public static FsCustomer WithNewName(this FsCustomer fsCust, string newName)
        {
            var name      = FsCustomerName.NewFsCustomerName(newName);
            var newFsCust = new FsCustomer(fsCust.Id, name);

            return(newFsCust);
        }
コード例 #3
0
        public FsCustomer CreateFsCustomer()
        {
            var id     = FsCustomerId.NewFsCustomerId(1);
            var name   = FsCustomerName.NewFsCustomerName("Alice");
            var fsCust = new FsCustomer(id, name);

            Console.WriteLine("Id={0}, Name={1}", fsCust.Id.Item, fsCust.Name.Item);
            return(fsCust);
        }