آشنایی با Refactoring - قسمت 8
نویسنده: وحید نصیری
تاریخ: ۱۳۹۰/۰۷/۲۱ ۰۰:۴۹:۰۰
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
using System;
using System.Collections.Generic;
namespace Refactoring.Day8.RemoveGodClasses.Before
{
public class CustomerService
{
public decimal CalculateOrderDiscount(IEnumerable<string> products, string customer)
{
// do work
throw new NotImplementedException();
}
public bool CustomerIsValid(string customer, int order)
{
// do work
throw new NotImplementedException();
}
public IEnumerable<string> GatherOrderErrors(IEnumerable<string> products, string customer)
{
// do work
throw new NotImplementedException();
}
public void Register(string customer)
{
// do work
}
public void ForgotPassword(string customer)
{
// do work
}
}
}
using System;
using System.Collections.Generic;
namespace Refactoring.Day8.RemoveGodClasses.After
{
public class CustomerOrderService
{
public decimal CalculateOrderDiscount(IEnumerable<string> products, string customer)
{
// do work
throw new NotImplementedException();
}
public bool CustomerIsValid(string customer, int order)
{
// do work
throw new NotImplementedException();
}
public IEnumerable<string> GatherOrderErrors(IEnumerable<string> products, string customer)
{
// do work
throw new NotImplementedException();
}
}
}
namespace Refactoring.Day8.RemoveGodClasses.After
{
public class CustomerRegistrationService
{
public void Register(string customer)
{
// do work
}
public void ForgotPassword(string customer)
{
// do work
}
}
}