It really depends on what is most readable to your customers. I can present several options:
1) , , , VB.NET :
interface IObject {
bool IsSecureConnection { get; }
}
interface ISecurableObject : IObject {
new bool IsSecureConnection { get; set; }
}
2) :
interface IObject {
bool IsSecureConnection { get; }
}
interface ISecurableObject : IObject {
void SetConnectionSecurity(bool isSecure);
}
3) , , false:
interface ISecurable {
bool IsSecureConnection { get; }
bool TrySecureConnection();
}
4) :
interface ISecurable {
bool IsSecureConnection { get; set; }
bool SupportsSecureConnection { get; }
}
, IMO, . , , - , , 3. , , ( ). , TrySecureConnection, , , .
, - 1 , , , IObject ISecurableObject. . 2 , / . , , ( 2), , - .
4, IMO ( - . IO.Stream) , . 90% , SupportsSecureConnection. , IsSecureConnection = true, , , IsSecureConnection.