在实现接口时,为什么不能在聚合中具体实现基本接口?
违反哪个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; }
}
相关分类