示例#1
0
        protected override IAPI CreateAPI(Task.Config config)
        {
            var api = base.CreateAPI(config);

            if (api != null)
            {
                //This API needs access to the config
                (api as API).Config = config as Config;
            }
            return(api);
        }
示例#2
0
        protected override IAPI CreateAPI(Task.Config config)
        {
            var api = base.CreateAPI(config);

            if (!(api is IAuthentication) || !(api is IExportAccessEvent))
            {
                throw new ApplicationException("The API does not implement one of the required interfaces for this task activity.");
            }

            return(api);
        }
示例#3
0
        protected override IAPI CreateAPI(Task.Config config)
        {
            var api = base.CreateAPI(config);

            if (!(api is API))
            {
                throw new ApplicationException("The API is not a Lubrizol API.");
            }

            //This API needs access to the config

            var lzApi = api as API;

            lzApi.ImportConfig = config as Config;
            lzApi.ExportConfig = config as Export.People.Config;
            lzApi.Mapper       = (config as Config).EmployeeMapper;

            return(api);
        }