DI Example
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace DependencyExample
|
||||
{
|
||||
public static class DependencyProvider
|
||||
{
|
||||
// This would be from the DI service
|
||||
public static IFileManager FileManager { get; set; }
|
||||
public static ILogger Logger { get; set; }
|
||||
}
|
||||
|
||||
public interface IFileManager
|
||||
{
|
||||
void WriteFileData(string path, string data);
|
||||
|
||||
string GetFileData(string path);
|
||||
}
|
||||
|
||||
public interface ILogger
|
||||
{
|
||||
void LogMessage(string message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user