|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IoCSample.Interface_Dependency_Injection
{
public interface ILoggerInject
{
ILogger Construct();
}
public class ConsoleLoggerInject : ILoggerInject
{
public ILogger Construct()
{
return new ConsoleLogger();
}
}
public class FileLoggerInject : ILoggerInject
{
public string FileName { get; set; }
public ILogger Construct()
{
return new FileLogger(FileName);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am Himanshu Manjarawala, Garduate in Computer Science and MCA From Veer Narmad South Gujarat University, Surat Gijarat India. Currently working as Sr. Software Developer in Automation Anywhere Softwares Pvt. Ltd. Vadodara, Gujarat