Ejemplo n.º 1
0
        internal static DataSourceAdapter GetAdapter(ConfigurationDetail details)
        {
            DataSourceAdapter adapter = null;

            switch (details.AdapterType)
            {
                case "JobAdapter":
                    adapter = new JobAdapter(details);
                    break;

                case "FileLoaderAdapter":
                    adapter = new FileLoaderAdapter(details);
                    break;

                default:
                    throw new NotSupportedException(String.Format("Invalid type {0} passed to Data Source Adapter Factory", details.AdapterType));
            }

            log.InfoFormat("Adapter factory instantiated a {0}", details.AdapterType);

            return adapter;
        }
Ejemplo n.º 2
0
 public FileLoaderAdapter(ConfigurationDetail _details) : base(_details) { }
Ejemplo n.º 3
0
 internal DataSourceAdapter(ConfigurationDetail _details)
 {
     details = _details;
 }
Ejemplo n.º 4
0
 public JobAdapter(ConfigurationDetail _details) : base(_details) { }