Beyond Dependency Injection: Listing 2.
Implementing IDataFeed.
public class RestDataFeed : IDataFeed
{
public string GetData()
{
return "rest";
}
}
public class LocalDataFeed : IDataFeed
{
public string GetData()
{
return "local";
}
}
About the Author
Patrick Steele is a senior .NET developer with Billhighway in Troy, Mich. A recognized expert on the Microsoft .NET Framework, heβs a former Microsoft MVP award winner and a presenter at conferences and user group meetings.