protected override PluginCommandResponseMessage OnExecute(PluginProfileDto profileDto) { NormalizeProfile(profileDto); ITargetProcessMessage message; if (_profileCollection.Any(x => x.Name == profileDto.Name)) { UpdatePluginProfile(profileDto); message = new ProfileUpdatedMessage(); } else { AddPluginProfile(profileDto); message = new ProfileAddedMessage(); } SendProfileChangedLocalMessage(profileDto.Name, message); return new PluginCommandResponseMessage {ResponseData = string.Empty, PluginCommandStatus = PluginCommandStatus.Succeed}; }
protected override PluginCommandResponseMessage OnExecute(PluginProfileDto profileDto) { NormalizeProfile(profileDto); ITargetProcessMessage message; if (_profileCollection.Any(x => x.Name == profileDto.Name)) { UpdatePluginProfile(profileDto); message = new ProfileUpdatedMessage(); } else { AddPluginProfile(profileDto); message = new ProfileAddedMessage(); } SendProfileChangedLocalMessage(profileDto.Name, message); return(new PluginCommandResponseMessage { ResponseData = string.Empty, PluginCommandStatus = PluginCommandStatus.Succeed }); }
public void Handle(ProfileUpdatedMessage message) { StartInitialization(); }