Skip to content

Commit

Permalink
Merge pull request #4 from simonec73/dev
Browse files Browse the repository at this point in the history
1.4.0
  • Loading branch information
simonec73 authored Feb 13, 2021
2 parents c0104c9 + 0a9ae7d commit e9f8860
Show file tree
Hide file tree
Showing 1,368 changed files with 170,546 additions and 5,693 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 simonec73
Copyright (c) 2018-2021 Simone Curzi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 14 additions & 1 deletion Samples/SampleExtensions/Actions/ConvertNameToUpperAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
using ThreatsManager.Interfaces.Extensions;
using ThreatsManager.Interfaces.Extensions.Actions;
using ThreatsManager.Interfaces.ObjectModel;
using ThreatsManager.Interfaces.ObjectModel.Entities;

namespace SampleExtensions.Actions
{
/// <summary>
/// A simple Action that creates an item in the context menu for the Entities.
/// </summary>
/// <remarks>The Extension attribute is required to allow the class to be recognized as an extension.</remarks>
[Extension(typeof(IContextAwareAction), "AEFC2C88-6D98-47BA-9A7E-27C7F5855D0F",
[Extension("AEFC2C88-6D98-47BA-9A7E-27C7F5855D0F",
"Convert Name to Upper Case Context Aware Action", 100, ExecutionMode.Simplified)]
public class ConvertNameToUpperAction : IIdentityContextAwareAction
{
Expand Down Expand Up @@ -65,6 +66,18 @@ public bool Execute(object item)
return (item is IIdentity identity) && Execute(identity);
}

/// <summary>
/// Function called before showing the Context menu with the Action, to determine if it should be visible.
/// </summary>
/// <param name="item">Context used to decide if the action must be shown.
/// <para>Given that the Extension is an IIdentityContextAwareAction and that the Scope is IEntity,
/// the object is necessarily a <see cref="ThreatsManager.Interfaces.ObjectModel.Entities.IEntity"/>.</para></param>
/// <returns>True if the Action is visible, false otherwise.</returns>
public bool IsVisible(object item)
{
return true;
}

/// <summary>
/// Execute the Extension.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Samples/SampleExtensions/ExtensionLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;

[assembly: ExtensionsContainer("1.3.4")]
[assembly: ExtensionsContainer("1.4.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace SampleExtensions.RibbonExtensions
{
[Extension(typeof(IMainRibbonExtension), "45636082-DB4B-4E9A-8D25-06384EFA104F",
[Extension("45636082-DB4B-4E9A-8D25-06384EFA104F",
"Azure Scanning Context Aware Action", 100, ExecutionMode.Expert)]
public class ScanAzureSubscription : IMainRibbonExtension, IDesktopAlertAwareExtension
{
Expand Down
16 changes: 8 additions & 8 deletions Samples/SampleExtensions/SampleExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<HintPath>..\packages\PostSharp.Patterns.Common.Redist.6.7.11\lib\net47\PostSharp.Patterns.Common.dll</HintPath>
</Reference>
<Reference Include="PostSharp.Patterns.Model, Version=6.7.11.0, Culture=neutral, PublicKeyToken=e7f631e6ce13f078, processorArchitecture=MSIL">
<HintPath>..\packages\PostSharp.Patterns.Model.Redist.6.7.11\lib\net40\PostSharp.Patterns.Model.dll</HintPath>
<HintPath>..\packages\PostSharp.Patterns.Model.Redist.6.7.11\lib\net45\PostSharp.Patterns.Model.dll</HintPath>
</Reference>
<Reference Include="PostSharp.Patterns.Threading, Version=6.7.11.0, Culture=neutral, PublicKeyToken=e7f631e6ce13f078, processorArchitecture=MSIL">
<HintPath>..\packages\PostSharp.Patterns.Threading.Redist.6.7.11\lib\net45\PostSharp.Patterns.Threading.dll</HintPath>
Expand All @@ -72,16 +72,16 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="ThreatsManager.Icons, Version=1.3.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Icons.dll</HintPath>
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Icons.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Interfaces, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Interfaces.1.3.4\lib\net472\ThreatsManager.Interfaces.dll</HintPath>
<Reference Include="ThreatsManager.Interfaces, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Interfaces.1.4.0\lib\net472\ThreatsManager.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Packaging, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Packaging.dll</HintPath>
<Reference Include="ThreatsManager.Packaging, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Packaging.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Utilities, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Utilities.dll</HintPath>
<Reference Include="ThreatsManager.Utilities, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Utilities.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Samples/SampleExtensions/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<package id="PostSharp.Redist" version="6.7.11" targetFramework="net472" />
<package id="System.ComponentModel.Composition" version="4.7.0" targetFramework="net472" />
<package id="System.Drawing.Common" version="4.7.0" targetFramework="net472" />
<package id="ThreatsManager.Interfaces" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Utilities" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Interfaces" version="1.4.0" targetFramework="net472" />
<package id="ThreatsManager.Utilities" version="1.4.0" targetFramework="net472" />
</packages>
2 changes: 1 addition & 1 deletion Samples/SampleWinFormExtensions/ExtensionLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;

[assembly: ExtensionsContainer("1.3.4")]
[assembly: ExtensionsContainer("1.4.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SampleWinFormExtensions.Initializers
/// Initializers are called every time a new Threat Model is created.
/// </summary>
/// <remarks>Initializers implement interface IInitializer.</remarks>
[Extension(typeof(IInitializer),"0C8C1CC5-B0F8-4D52-9874-4E9D73801AAD",
[Extension("0C8C1CC5-B0F8-4D52-9874-4E9D73801AAD",
"Definitions Schema Initializer", 10, ExecutionMode.Business)]
public class DefinitionsSchemaInitializer : IInitializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SampleWinFormExtensions.Initializers
/// </summary>
/// <remarks>It is called only once, when the Extension is loaded.
/// It is typically required to make classes known to support Json deserialization.</remarks>
[Extension(typeof(IExtensionInitializer), "FD73F28E-5D76-4CBD-98E5-0F0793CA5A24",
[Extension("FD73F28E-5D76-4CBD-98E5-0F0793CA5A24",
"Sample WinForms Extensions Initializer", 10, ExecutionMode.Business)]
public class ExtensionInitializer : IExtensionInitializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SampleWinFormExtensions.Panels.AzureDevOps
{
[Extension(typeof(IPanelFactory), "9A97643C-278A-4F39-BCCE-6D447203C12A",
[Extension("9A97643C-278A-4F39-BCCE-6D447203C12A",
"Simulated Azure DevOps Integration", 1000, ExecutionMode.Management)]
public partial class AzureDevOpsPanelFactory : IPanelFactory<Form>, IMainRibbonExtension, IPanelFactoryActionsRequestor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace SampleWinFormExtensions.Panels.Definitions
{
[Extension(typeof(IPanelFactory), "2ED5A24F-1666-4171-B4AB-07FF00AAD2D6",
[Extension("2ED5A24F-1666-4171-B4AB-07FF00AAD2D6",
"Definitions Editor Panel", 1000, ExecutionMode.Business)]
public partial class DefinitionsPanelFactory : IPanelFactory<Form>, IMainRibbonExtension, IPanelFactoryActionsRequestor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SampleWinFormExtensions.Panels.Validate
{
[Extension(typeof(IPanelFactory), "A53B0FCF-A888-4737-8BE0-5F38CB769A51",
[Extension("A53B0FCF-A888-4737-8BE0-5F38CB769A51",
"Threat Model Validation", 1000, ExecutionMode.Management)]
public partial class ValidatePanelFactory : IPanelFactory<Form>, IMainRibbonExtension, IPanelFactoryActionsRequestor
{
Expand Down
25 changes: 14 additions & 11 deletions Samples/SampleWinFormExtensions/SampleWinFormExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<HintPath>..\packages\Fizzler.1.2.0\lib\netstandard2.0\Fizzler.dll</HintPath>
</Reference>
<Reference Include="Keyoti.RapidSpell.NET4, Version=6.0.19.705, Culture=neutral, PublicKeyToken=58d9fd2e9ec4dc0e, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.WinForms.1.3.4\lib\net472\Keyoti.RapidSpell.NET4.dll</HintPath>
<HintPath>..\packages\ThreatsManager.Utilities.WinForms.1.4.0\lib\net472\Keyoti.RapidSpell.NET4.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
Expand All @@ -58,7 +58,7 @@
<HintPath>..\packages\PostSharp.Patterns.Common.Redist.6.7.11\lib\net47\PostSharp.Patterns.Common.dll</HintPath>
</Reference>
<Reference Include="PostSharp.Patterns.Model, Version=6.7.11.0, Culture=neutral, PublicKeyToken=e7f631e6ce13f078, processorArchitecture=MSIL">
<HintPath>..\packages\PostSharp.Patterns.Model.Redist.6.7.11\lib\net40\PostSharp.Patterns.Model.dll</HintPath>
<HintPath>..\packages\PostSharp.Patterns.Model.Redist.6.7.11\lib\net45\PostSharp.Patterns.Model.dll</HintPath>
</Reference>
<Reference Include="PostSharp.Patterns.Threading, Version=6.7.11.0, Culture=neutral, PublicKeyToken=e7f631e6ce13f078, processorArchitecture=MSIL">
<HintPath>..\packages\PostSharp.Patterns.Threading.Redist.6.7.11\lib\net45\PostSharp.Patterns.Threading.dll</HintPath>
Expand Down Expand Up @@ -86,20 +86,23 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="ThreatsManager.AutoGenRules, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.WinForms.1.4.0\lib\net472\ThreatsManager.AutoGenRules.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Icons, Version=1.3.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Icons.dll</HintPath>
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Icons.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Interfaces, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Interfaces.1.3.4\lib\net472\ThreatsManager.Interfaces.dll</HintPath>
<Reference Include="ThreatsManager.Interfaces, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Interfaces.1.4.0\lib\net472\ThreatsManager.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Packaging, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Packaging.dll</HintPath>
<Reference Include="ThreatsManager.Packaging, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Packaging.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Utilities, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Utilities.dll</HintPath>
<Reference Include="ThreatsManager.Utilities, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Utilities.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Utilities.WinForms, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.WinForms.1.3.4\lib\net472\ThreatsManager.Utilities.WinForms.dll</HintPath>
<Reference Include="ThreatsManager.Utilities.WinForms, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.WinForms.1.4.0\lib\net472\ThreatsManager.Utilities.WinForms.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Samples/SampleWinFormExtensions/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<package id="Svg" version="3.1.1" targetFramework="net472" />
<package id="System.ComponentModel.Composition" version="4.7.0" targetFramework="net472" />
<package id="System.Drawing.Common" version="4.7.0" targetFramework="net472" />
<package id="ThreatsManager.Interfaces" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Utilities" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Utilities.WinForms" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Interfaces" version="1.4.0" targetFramework="net472" />
<package id="ThreatsManager.Utilities" version="1.4.0" targetFramework="net472" />
<package id="ThreatsManager.Utilities.WinForms" version="1.4.0" targetFramework="net472" />
</packages>
2 changes: 1 addition & 1 deletion Samples/SimpleThreatModelAnalyzer/ExtensionLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;

[assembly: ExtensionsContainer("1.3.4")]
[assembly: ExtensionsContainer("1.4.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SimpleThreatModelAnalyzer")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
20 changes: 10 additions & 10 deletions Samples/SimpleThreatModelAnalyzer/SimpleThreatModelAnalyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<HintPath>..\packages\PostSharp.Patterns.Common.Redist.6.7.11\lib\net47\PostSharp.Patterns.Common.dll</HintPath>
</Reference>
<Reference Include="PostSharp.Patterns.Model, Version=6.7.11.0, Culture=neutral, PublicKeyToken=e7f631e6ce13f078, processorArchitecture=MSIL">
<HintPath>..\packages\PostSharp.Patterns.Model.Redist.6.7.11\lib\net40\PostSharp.Patterns.Model.dll</HintPath>
<HintPath>..\packages\PostSharp.Patterns.Model.Redist.6.7.11\lib\net45\PostSharp.Patterns.Model.dll</HintPath>
</Reference>
<Reference Include="PostSharp.Patterns.Threading, Version=6.7.11.0, Culture=neutral, PublicKeyToken=e7f631e6ce13f078, processorArchitecture=MSIL">
<HintPath>..\packages\PostSharp.Patterns.Threading.Redist.6.7.11\lib\net45\PostSharp.Patterns.Threading.dll</HintPath>
Expand Down Expand Up @@ -89,20 +89,20 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="ThreatsManager.Engine, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Engine.1.3.4\lib\net472\ThreatsManager.Engine.dll</HintPath>
<Reference Include="ThreatsManager.Engine, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Engine.1.4.0\lib\net472\ThreatsManager.Engine.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Icons, Version=1.3.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Icons.dll</HintPath>
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Icons.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Interfaces, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Interfaces.1.3.4\lib\net472\ThreatsManager.Interfaces.dll</HintPath>
<Reference Include="ThreatsManager.Interfaces, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Interfaces.1.4.0\lib\net472\ThreatsManager.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Packaging, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Packaging.dll</HintPath>
<Reference Include="ThreatsManager.Packaging, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Packaging.dll</HintPath>
</Reference>
<Reference Include="ThreatsManager.Utilities, Version=1.3.4.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.3.4\lib\net472\ThreatsManager.Utilities.dll</HintPath>
<Reference Include="ThreatsManager.Utilities, Version=1.4.0.0, Culture=neutral, PublicKeyToken=e345404a827fb4c3, processorArchitecture=MSIL">
<HintPath>..\packages\ThreatsManager.Utilities.1.4.0\lib\net472\ThreatsManager.Utilities.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Samples/SimpleThreatModelAnalyzer/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<package id="System.Security.Cryptography.ProtectedData" version="4.7.0" targetFramework="net472" />
<package id="System.Security.Permissions" version="4.7.0" targetFramework="net472" />
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net472" />
<package id="ThreatsManager.Engine" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Interfaces" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Utilities" version="1.3.4" targetFramework="net472" />
<package id="ThreatsManager.Engine" version="1.4.0" targetFramework="net472" />
<package id="ThreatsManager.Interfaces" version="1.4.0" targetFramework="net472" />
<package id="ThreatsManager.Utilities" version="1.4.0" targetFramework="net472" />
</packages>
Loading

0 comments on commit e9f8860

Please sign in to comment.