private static string GetResponse(string args) { var profile = args.DeserializeProfile(); var settings = (ConnectionSettings) profile.Settings; var errors = new PluginProfileErrorCollection(); settings.ValidateConnection(errors); if (errors.Any()) { return errors.Serialize(); } CheckConnection(settings, errors); return errors.Any() ? errors.Serialize() : string.Empty; }
private static string GetResponse(string args) { var profile = args.DeserializeProfile(); var settings = (ConnectionSettings)profile.Settings; var errors = new PluginProfileErrorCollection(); settings.ValidateConnection(errors); if (errors.Any()) { return(errors.Serialize()); } CheckConnection(settings, errors); return(errors.Any() ? errors.Serialize() : string.Empty); }
public PluginCommandResponseMessage Execute(string args, UserDTO user) { var errors = new PluginProfileErrorCollection(); var profile = args.DeserializeProfile(); var settings = (BugzillaProfile) profile.Settings; var properties = GetBugzillaProperties(settings, errors); return errors.Any() ? new PluginCommandResponseMessage {PluginCommandStatus = PluginCommandStatus.Fail, ResponseData = errors.Serialize()} : new PluginCommandResponseMessage {PluginCommandStatus = PluginCommandStatus.Succeed, ResponseData = properties.Serialize()}; }
public PluginCommandResponseMessage Execute(string args) { var mashup = args.Deserialize <T>(); NormalizeMashup(mashup); PluginProfileErrorCollection errors = ExecuteOperation(mashup); return(new PluginCommandResponseMessage { PluginCommandStatus = errors.Any() ? PluginCommandStatus.Fail : PluginCommandStatus.Succeed, ResponseData = errors.Serialize() }); }
public PluginCommandResponseMessage Execute(string args) { var errors = new PluginProfileErrorCollection(); var profile = args.DeserializeProfile(); var settings = (BugzillaProfile)profile.Settings; var properties = GetBugzillaProperties(settings, errors); return(errors.Any() ? new PluginCommandResponseMessage { PluginCommandStatus = PluginCommandStatus.Fail, ResponseData = errors.Serialize() } : new PluginCommandResponseMessage { PluginCommandStatus = PluginCommandStatus.Succeed, ResponseData = properties.Serialize() }); }
private string OnExecute(string args) { var profile = args.DeserializeProfile(); var errors = new PluginProfileErrorCollection(); try { OnCheckConnection(errors, (TVcsPluginProfile)profile.Settings); } catch (StructureMapException e) { ObjectFactory.GetInstance <ICheckConnectionErrorResolver>().HandleConnectionError(e.InnerException, errors); } catch (Exception e) { ObjectFactory.GetInstance <ICheckConnectionErrorResolver>().HandleConnectionError(e, errors); } OnExecuted((TVcsPluginProfile)profile.Settings); return(errors.Serialize()); }