using OSCADSharp.IO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OSCADSharp.Utility
{
///
/// Contains definitions for external APIs used by OSCADSharp
///
public static class Dependencies
{
///
/// Used to write scripts to file
///
public static IFileWriter FileWriter { get; private set; } = new DefaultFileWriter();
///
/// Sets the filewriter for OSCADSharp to use
///
///
public static void SetFileWriter(IFileWriter writer)
{
FileWriter = writer;
}
///
/// Factory method to provide the class used to perform actions on output scripts
///
public static Func FileInvokerFactory { get; private set; } = (path) => { return new DefaultFileInvoker(path); };
///
/// Sets the factory method OSCADSharp will use to get
/// file invoker objects
///
///
public static void SetFileInvokerFactory(Func invokerFactoryMethod)
{
FileInvokerFactory = invokerFactoryMethod;
}
}
}