/// <summary> /// Import a single item based on a uSyncAction item /// </summary> /// <remarks> /// Importing a single item based on an action, the action will /// detail what handler to use and the filename of the item to import /// </remarks> /// <param name="action">Action item, to use as basis for import</param> /// <returns>Action detailing change or not</returns> public uSyncAction ImportSingleAction(uSyncAction action) { var handlerConfig = handlerFactory.GetValidHandler(action.HandlerAlias); if (handlerConfig != null && handlerConfig.Handler is ISyncExtendedHandler extendedHandler) { extendedHandler.Import(action.FileName, handlerConfig.Settings, true); } return(new uSyncAction()); }
/// <summary> /// Import a single item based on a uSyncAction item /// </summary> /// <remarks> /// Importing a single item based on an action, the action will /// detail what handler to use and the filename of the item to import /// </remarks> /// <param name="action">Action item, to use as basis for import</param> /// <returns>Action detailing change or not</returns> public uSyncAction ImportSingleAction(uSyncAction action) { var handlerConfig = _handlerFactory.GetValidHandler(action.HandlerAlias); if (handlerConfig != null) { return(handlerConfig.Handler .Import(action.FileName, handlerConfig.Settings, true) .FirstOrDefault()); } return(new uSyncAction()); }