/// <summary> /// Deactivates the specified link. /// </summary> /// <param name="link">The link.</param> /// <returns>ILink.</returns> public ILink Deactivate(ILink link) { var clt = CreateClient(); try { return(clt.Deactivate(link.Zip()).Unzip <Link>()); } catch (Exception ex) { Logger.Error(ex.GetCombinedMessages()); link.AddError(ex.GetCombinedMessages()); return(link); } finally { CloseClient(clt); } }
/// <summary> /// Gets the sources. /// </summary> /// <param name="link">The link.</param> /// <param name="activeOnly">if set to <c>true</c> [active only].</param> /// <returns>IEnumerable<ILink>.</returns> public IEnumerable <ILink> GetSources(ILink link, bool activeOnly = true) { var clt = CreateClient(); try { return(clt .GetSources(link.Zip(), activeOnly) .Unzip <Link>()); } catch (Exception ex) { Logger.Error(ex.GetCombinedMessages()); link.AddError(ex.GetCombinedMessages()); return(new[] { link }); } finally { CloseClient(clt); } }