Skip to content

IRoadmapPropertyProvider

Simone Curzi edited this page Feb 27, 2021 · 3 revisions
Name Roadmap Property Provider
Purpose Property Provider used to provide properties for the items in the Roadmap Panel.
Source IRoadmapPropertyProvider.cs
Related Interfaces
Related Extensions

Description

The Roadmap Property Provider is used to retrieve and show additional information in the Roadmap, associated to a Mitigation.

The Roadmap Panel is a IPanel implemented in Threats Manager Studio standard Extensions, which allows to define a Roadmap for Mitigations. For more information, please refer to Roadmap - Threats Manager Studio. IPanels are created by IPanelFactory.

Reference Implementations

Reference implementation for IRoadmapPropertyProvider is available in IterationRoadmapProvider.cs from project ThreatsManager.DevOps.

[Extension("4AF3DDCB-DFBD-400E-B05B-90C36E979F1A", "Iteration Roadmap Property Provider", 30, ExecutionMode.Business)]
public class IterationRoadmapProvider : IRoadmapPropertyProvider
{
  public string Name => "Iteration";
  
  public string GetValue([NotNull] IMitigation mitigation)
  {
    string result = null;

    if (mitigation.Model is IThreatModel model)
    {
      var schemaManager = new DevOpsPropertySchemaManager(model);
      result = schemaManager.GetFirstSeenOn(mitigation)?.GetIteration(model)?.Name;
    }

    return result;
  }
}

Examples

There are no examples of custom extensions of this type.

Clone this wiki locally