Skip to content

Commit

Permalink
#24: Added [Conditional("CODE_ANALYSIS")] to all Sequence Diagram att…
Browse files Browse the repository at this point in the history
…ributes
  • Loading branch information
MarcinCelej committed May 21, 2023
1 parent ce49564 commit 15be833
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;

// TODO: Marcin Celej [from: Marcin Celej on: 08-04-2023]: Add optional attributes when compilation constant CODE_ANALYSIS (or other) is present
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramActivationAttribute : Attribute, SequenceDiagramElement, SequenceDiagramGroup
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramCallAttribute : Attribute, SequenceDiagramElement, SequenceDiagramGroup
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramDatabaseCallAttribute : SequenceDiagramExternalCallAttribute
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramDeactivationAttribute : Attribute, SequenceDiagramElement
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramElementAttribute : Attribute, SequenceDiagramElement
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramExternalActivationAttribute : Attribute, SequenceDiagramElement, SequenceDiagramGroup
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramExternalCallAttribute : Attribute, SequenceDiagramElement, SequenceDiagramGroup
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramNoteAttribute : Attribute, SequenceDiagramElement
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Synergy.Architecture.Annotations.Diagrams.Sequence;
using System.Diagnostics;

namespace Synergy.Architecture.Annotations.Diagrams.Sequence;

[Conditional("CODE_ANALYSIS")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
public class SequenceDiagramSelfCallAttribute : Attribute, SequenceDiagramElement, SequenceDiagramGroup
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>TRACE;CODE_ANALYSIS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>TRACE;CODE_ANALYSIS</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Windsor" Version="5.0.1" />
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>TRACE;CODE_ANALYSIS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>TRACE;CODE_ANALYSIS</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Windsor" Version="5.0.1" />
<PackageReference Include="Castle.Windsor.MsDependencyInjection" Version="3.4.0" />
Expand Down

0 comments on commit 15be833

Please sign in to comment.