public PluginCommandResponseMessage Execute(string args) { var profileDtos = _profileCollection.Select(x => x.ConvertToDto()).ToArray(); return(new PluginCommandResponseMessage { ResponseData = profileDtos.Serialize(), PluginCommandStatus = PluginCommandStatus.Succeed }); }
protected void ChangeProfiles(Action <IProfileCollection> changeProfilesAction) { changeProfilesAction(_profileCollection); var message = CreatePluginInfoChangedMessage(PluginContext.AccountName, _profileCollection.Select(profile => profile.ConvertToPluginProfile()). ToArray()); _bus.Send(message); }
private void DispatchToProfiles(ITargetProcessMessage message, Action <IProfileGateway, ITargetProcessMessage> sendAction) { _bus.DoNotContinueDispatchingCurrentMessageToHandlers(); foreach ( var gateway in _profileCollection.Select(profile => new ProfileGateway(profile, _pluginContext.AccountName, _bus))) { sendAction(gateway, message); } }
public PluginCommandResponseMessage Execute(string args) { var responseData = _profileCollection.Select( x => new ProfileErrorCheckResult { ProfileName = x.Name.Value, ErrorsExist = x.Log.CheckForErrors() }).ToArray(). Serialize(); return(new PluginCommandResponseMessage { ResponseData = responseData, PluginCommandStatus = PluginCommandStatus.Succeed }); }