예제 #1
0
    public object GetDefaultConfig()
    {
        const string fileSystem = "FileSystem";

        ComponentizedDalItem dalItem = new ComponentizedDalItem
        {
            Key  = fileSystem,
            Type = "Synapse.Controller.Dal.FileSystem:FileSystemDal"
        };

        IControllerDal fsd = AssemblyLoader.Load <IControllerDal>(dalItem.Type, string.Empty);

        dalItem.Config = fsd.GetDefaultConfig();

        return(new ComponentizedDalConfig
        {
            SecurityProviderKey = fileSystem,
            ExecuteReaderKey = fileSystem,
            HistoryWriterKey = fileSystem,

            DalComponents = new List <ComponentizedDalItem> {
                dalItem
            }
        });
    }
예제 #2
0
 void ConfigureDalProvider()
 {
     try
     {
         IControllerDal dal = AssemblyLoader.Load <IControllerDal>(Type, DefaultType);
         Config = dal?.GetDefaultConfig();
     }
     catch { }
 }