예제 #1
0
 public static void UseDataManager(this ServiceProvider provider)
 {
     provider.AddSingleton <DesignEngine>();
     provider.AddSingleton <ISceneManager, SceneManager>();
     provider.AddSingleton <IProjectManager, ProjectManager>();
     provider.AddSingleton <IAssetManager, AssetManager>();
 }
예제 #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>();
 }
예제 #4
0
 public static void UseFile(this ServiceProvider provider)
 {
     provider.AddSingleton <IFileService, FileService>();
 }
예제 #5
0
 public static void UseProcess(this ServiceProvider provider)
 {
     provider.AddSingleton <IProcessService, ProcessService>();
 }
예제 #6
0
 public static void UseGameSerializer(this ServiceProvider provider)
 {
     provider.AddSingleton <ISerializer, BinarySerializer>();
 }
예제 #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);
 }
 public static void UseDialog(this ServiceProvider provider)
 {
     provider.AddSingleton <IDialogService, DialogService>();
 }