Skip to content

Commit

Permalink
Sample: Conditionals (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfevia authored Aug 4, 2024
1 parent dceb29e commit fdcd3b9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
12 changes: 11 additions & 1 deletion PowerAutomate.Desktop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.1.ActionSelectors", "2.1.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Modules.ActionSelectors.Actions", "samples\Modules.ActionSelectors.Actions\Modules.ActionSelectors.Actions.csproj", "{278DD34D-AC4C-4756-A58A-5E5BD4EB84DD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "5.Advanced", "5.Advanced", "{8F617F6B-EB33-4D20-B3EA-18A6D48F38B0}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "6.Advanced", "6.Advanced", "{8F617F6B-EB33-4D20-B3EA-18A6D48F38B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.Features", "2.Features", "{C8F10AE7-BB68-4D4E-BF33-6DF7D7D24311}"
EndProject
Expand All @@ -65,6 +65,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.Categories", "4.Categorie
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Modules.Categories.Actions", "samples\Modules.Categories.Actions\Modules.Categories.Actions.csproj", "{10147DFD-8CFC-41CD-A3EC-A8B8AA110DF1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "5.Conditionals", "5.Conditionals", "{22D1EE4E-815F-48F2-AB46-754518B1F914}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Modules.Conditionals.Actions", "samples\Modules.Conditionals.Actions\Modules.Conditionals.Actions.csproj", "{791698E0-931E-4F35-97A4-B050FD0B4F82}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -139,6 +143,10 @@ Global
{10147DFD-8CFC-41CD-A3EC-A8B8AA110DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10147DFD-8CFC-41CD-A3EC-A8B8AA110DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10147DFD-8CFC-41CD-A3EC-A8B8AA110DF1}.Release|Any CPU.Build.0 = Release|Any CPU
{791698E0-931E-4F35-97A4-B050FD0B4F82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{791698E0-931E-4F35-97A4-B050FD0B4F82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{791698E0-931E-4F35-97A4-B050FD0B4F82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{791698E0-931E-4F35-97A4-B050FD0B4F82}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -172,6 +180,8 @@ Global
{283D282B-497D-46B1-A822-BF1F4B116A84} = {9C21EBF9-3443-4DAE-9000-53E4D41995D2}
{58A11983-1ED4-4D38-998C-C1B033A58842} = {FEFFE5BC-DCBD-466C-87DE-5B9D8A553256}
{10147DFD-8CFC-41CD-A3EC-A8B8AA110DF1} = {58A11983-1ED4-4D38-998C-C1B033A58842}
{22D1EE4E-815F-48F2-AB46-754518B1F914} = {FEFFE5BC-DCBD-466C-87DE-5B9D8A553256}
{791698E0-931E-4F35-97A4-B050FD0B4F82} = {22D1EE4E-815F-48F2-AB46-754518B1F914}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Modules.Actions.Shared\Modules.Actions.Shared.projitems*{7e19e2f1-6de7-4a0e-aed8-7cea38b166af}*SharedItemsImports = 13
Expand Down
19 changes: 19 additions & 0 deletions samples/Modules.Conditionals.Actions/ConditionalAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ---------------------------------------------------
// Copyright (c) Jesus Fernandez. All Rights Reserved.
// ---------------------------------------------------

using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK;
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes;

namespace PowerAutomate.Desktop.Modules.Conditionals.Actions;

[ConditionAction(ResultPropertyName = nameof(Result))]
public class ConditionalAction : ActionBase
{
public bool Result { get; set; }

public override void Execute(ActionContext context)
{
// Nothing
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyTitle>Conditionals</AssemblyTitle>
<TargetFramework>net472</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<PackCustomModule Condition=" '$(Configuration)' == 'Debug' ">true</PackCustomModule>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK" />
</ItemGroup>

</Project>

0 comments on commit fdcd3b9

Please sign in to comment.