在实现接口时,为什么不能在聚合中具体实现基本接口?违反哪个OOP原则?StorageEntitySas本质上是IStorageEntitySas类型public interface IValetKeyResponse{ IStorageEntitySas Sas { get; set; } string UploadUrl { get; set; }}public class ValetKeyResponse : IValetKeyResponse{ //Which OOP, principle is violating here? StorageEntitySas is essentially of type IStorageEntitySas **public StorageEntitySas Sas { get; set; }** public string UploadUrl { get; set; }}public class StorageEntitySas : IStorageEntitySas{ public string Credentials { get; set; } public Uri BlobUri { get; set; } public string Name { get; set; }}
2 回答
- 2 回答
- 0 关注
- 135 浏览
添加回答
举报
0/150
提交
取消