Frends.Tasks.Attributes
1.2.1
dotnet add package Frends.Tasks.Attributes --version 1.2.1
NuGet\Install-Package Frends.Tasks.Attributes -Version 1.2.1
<PackageReference Include="Frends.Tasks.Attributes" Version="1.2.1" />
<PackageVersion Include="Frends.Tasks.Attributes" Version="1.2.1" />
<PackageReference Include="Frends.Tasks.Attributes" />
paket add Frends.Tasks.Attributes --version 1.2.1
#r "nuget: Frends.Tasks.Attributes, 1.2.1"
#:package Frends.Tasks.Attributes@1.2.1
#addin nuget:?package=Frends.Tasks.Attributes&version=1.2.1
#tool nuget:?package=Frends.Tasks.Attributes&version=1.2.1
Frends.Tasks.Attributes
Custom decorator attributes for FRENDS task parameters. Allows you to have e.g. conditional fields or tabbed inputs.
ConditionalDisplayAttribute
Shows the parameter if another property has the expected value
Parameters:
- OtherProperty - Name of property whose value to check
- ConditionValue - If matches the property value, the parameter is displayed
Example usage:
public Enum ParameterChoice
{
Parameter,
Parameter2
}
public class ParameterGroup
{
public ParameterChoice WhichParameterToShow { get; set; }
[ConditionalDisplay(nameof(WhichParameterToShow), ParameterChoice.Parameter)]
public string Parameter { get; set; }
[ConditionalDisplay(nameof(WhichParameterToShow), ParameterChoice.Parameter2)]
public string Parameter2 { get; set; }
}
DefaultDisplayType
Sets how the editor field should be shown by default, can be any of the following:
Text
MultilineText
Json
Xml
Sql
Expression
For example, the for a byte[]
parameter, the following would render the editor field by default in expression mode instead of the array editor:
[DefaultDisplayType(DisplayType.Expression)]
public byte[] Bytes { get; set; }
CustomDisplay
Allows grouping of parameters to tabs or under expanders. Value can be one of:
Default
Tab
Expander
For example, the following will render the input
and options
parameters for the task in different tabs:
public static async Task<SampleTaskResult> Sample(
[CustomDisplay(DisplayOption.Tab)] SampleInput input,
[CustomDisplay(DisplayOption.Tab)] SampleOptions options)
{
...
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|