我有服务界面:
[ServiceContract]
public interface IMainService
{
[OperationContract]
AResponse A(ARequest req);
[OperationContract]
BResponse B(BRequest req);
}
现在,过了一段时间(用户/机器人通过SDK或ServiceReference使用)后,我想将其拆分:
[ServiceContract]
public interface IMainService : IAService, IBService
{
}
public interface IBService //logical partition B
{
[OperationContract]
BResponse B(BRequest req);
}
public interface IAService //logical partition A
{
[OperationContract]
AResponse A(ARequest req);
}
这会破坏任何东西(向后兼容性等)还是重构使用中服务的好方法?如果不是,我应该如何在不更改客户端的情况下拆分服务合同?