samedi 12 novembre 2022

Create a place holder for an object

Here is a method that I've defined in my own library:

public override void Setup(Feed feed)
{

    SetTitle(feed.title);
    SetText(feed.text);
    SetDate(feed.CreationTime);
    SetSubTitle(feed.subtitle);
    SetLikes(feed.likes);
}

The Feed class is defined in another library that I'm not the owner of that library and also I don't want to use it in this library project (layer) to avoid the dependency; how can I create a placeholder for the Feed class in my own library so that after building the library it makes me available to inject the dependency to the method on the main application.

Aucun commentaire:

Enregistrer un commentaire