Skip to content

Commit

Permalink
Merge pull request #764 from Particular/use-nservicebus-sagaudit
Browse files Browse the repository at this point in the history
Use NServiceBus.SagaAudit instead of old plugins
  • Loading branch information
WilliamBZA committed Nov 15, 2017
2 parents 0555370 + 6a7f502 commit 628115d
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/ServiceInsight/Saga/SagaWindowViewModel.cs
Expand Up @@ -44,7 +44,7 @@ public class SagaWindowViewModel : Screen,
ShowEntireContentCommand = Command.Create(arg => ShowEntireContent((SagaUpdatedValue)arg));
}

public string InstallScriptText { get; set; }
public string InstallScriptText { get; } = "install-package NServiceBus.SagaAudit";

public ICommand CopyCommand { get; }

Expand Down Expand Up @@ -98,8 +98,6 @@ public void Handle(SelectedMessageChanged @event)
return;
}

UpdateInstallScriptText(message);

RefreshSaga(message);

SelectedMessageId = message.MessageId;
Expand All @@ -118,17 +116,6 @@ public void Handle(ServiceControlConnectionChanged message)
ClearSaga();
}

void UpdateInstallScriptText(StoredMessage message)
{
InstallScriptText = $"install-package ServiceControl.Plugin.NSB{GetMajorVersion(message)}.SagaAudit";
}

string GetMajorVersion(StoredMessage message)
{
var version = message.GetHeaderByKey(MessageHeaderKeys.Version);
return version?.Split('.').First();
}

void ClearSaga()
{
Data = null;
Expand Down Expand Up @@ -322,4 +309,4 @@ void SetSelected(SagaMessage message, string id)
message.IsSelected = message.MessageId == id;
}
}
}
}

0 comments on commit 628115d

Please sign in to comment.