Ejemplo n.º 1
0
 public static void UseDataManager(this ServiceProvider provider)
 {
     provider.AddSingleton <DesignEngine>();
     provider.AddSingleton <ISceneManager, SceneManager>();
     provider.AddSingleton <IProjectManager, ProjectManager>();
     provider.AddSingleton <IAssetManager, AssetManager>();
 }
Ejemplo n.º 2
0
        internal void Load()
        {
            RootLogger = new CompoundLogger();
            if (!Directory.Exists(TemporaryDirectory))
            {
                Directory.CreateDirectory(TemporaryDirectory);
            }

            if (!Directory.Exists(FrameworkDirectory))
            {
                Directory.CreateDirectory(FrameworkDirectory);
            }

            if (!Directory.Exists(ModuleDirectory))
            {
                Directory.CreateDirectory(ModuleDirectory);
            }

            ((CompoundLogger)RootLogger).AddLogger(new FileLogger(Path.Combine(FrameworkDirectory, "Core.log"), 1000000, TimeSpan.FromDays(30)));
            ServiceProvider.AddSingleton <IExecutionEngine, ExecutionEngine>();
        }
 public static void UseMessenger(this ServiceProvider provider)
 {
     provider.AddSingleton <IMessenger, Messenger>();
 }
Ejemplo n.º 4
0
 public static void UseFile(this ServiceProvider provider)
 {
     provider.AddSingleton <IFileService, FileService>();
 }
Ejemplo n.º 5
0
 public static void UseProcess(this ServiceProvider provider)
 {
     provider.AddSingleton <IProcessService, ProcessService>();
 }
Ejemplo n.º 6
0
 public static void UseGameSerializer(this ServiceProvider provider)
 {
     provider.AddSingleton <ISerializer, BinarySerializer>();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Sets the generator.
 /// </summary>
 /// <typeparam name="TGen"></typeparam>
 /// <returns></returns>
 public override ISolidConfigurationBuilder SetGenerator <TGen>()
 {
     ServiceProvider.AddSingleton <ISolidProxyGenerator>(new TGen());
     return(this);
 }
Ejemplo n.º 8
0
 public static void UseDialog(this ServiceProvider provider)
 {
     provider.AddSingleton <IDialogService, DialogService>();
 }