为什么我们不能在聚合中具体实现基本接口?

在实现接口时,为什么不能在聚合中具体实现基本接口?


违反哪个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; }

}


偶然的你
浏览 136回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP