public void HandleUrl(INexusUrl url) { var attribute = url.Data.GetType().GetCustomAttribute <UrlActionTaskAttribute>(); if (attribute?.TaskType != null && typeof(UrlQueueableTask).IsAssignableFrom(attribute.TaskType)) { var task = ObjectFactory.GetInstance <UrlQueueableTask>(attribute.TaskType); task.Data = url.Data; _taskManager.Add(task); } }
public void HandleUrl(INexusUrl url) { var attribute = url.Data.GetType().GetCustomAttribute<UrlActionTaskAttribute>(); if (attribute?.TaskType != null && typeof (UrlQueueableTask).IsAssignableFrom(attribute.TaskType)) { var task = ObjectFactory.GetInstance<UrlQueueableTask>(attribute.TaskType); task.Data = url.Data; _taskManager.Add(task); } }