使用C#和NET 4.0,我有兩個實現內部接口(IMethod)的公共接口(IAsyncMethod和ISyncMethod),我需要將公共訪問修飾符前兩個,內部的第三個,所以我可以只爲另一個dll/project/developer啓用兩個公共接口。如何限制訪問由其他公共接口實現的內部接口
internal interface IPaymentMethod
{
XmlDocument StartTransaction(XmlDocument parameters);
XmlDocument QueryTransaction(XmlDocument parameters);
}
public interface ISyncMethod : IMethod
{
void EndTransaction(TransactionDTO parameter);
}
public interface IAsyncMethod : IMethod
{
void EndTransaction(TransactionDTO parameter);
}
當我生成項目,我收到這些錯誤:
Inconsistent accessibility: base interface 'IMethod' is less accessible than interface 'ISyncMethod'
Inconsistent accessibility: base interface 'IMethod' is less accessible than interface 'IAsyncMethod'
如何我將設置修飾符,讓我需要的行爲?