Skip to content

Commit

Permalink
Credentials: Type cache (24.12) [STUD-72720] (#454)
Browse files Browse the repository at this point in the history
* Credentials: Type cache (24.12) [STUD-72720]

Switch from Net5 to Net6
Add view models project
Add view models and resources
Update pipeline to build for Net6
Fix package id

* Credentials: Use agent that builds with .net 6

---------

Co-authored-by: Alexandru Petre <93531170+alexandru-petre@users.noreply.github.com>
  • Loading branch information
viogroza and alexandru-petre authored Dec 12, 2024
1 parent 93fb81f commit 514fd2b
Show file tree
Hide file tree
Showing 13 changed files with 555 additions and 12 deletions.
10 changes: 8 additions & 2 deletions Activities/Activities.Credentials.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30621.155
# Visual Studio Version 17
VisualStudioVersion = 17.12.35527.113 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UiPath.Credentials.Activities", "Credentials\UiPath.Credentials.Activities\UiPath.Credentials.Activities.csproj", "{ACB02213-A7C2-4BCA-ACE2-2BFAD6E0E54C}"
EndProject
Expand All @@ -15,6 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.build.targets = Directory.build.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UiPath.Credentials.Activities.ViewModels", "Credentials\UiPath.Credentials.Activities.ViewModels\UiPath.Credentials.Activities.ViewModels.csproj", "{5BCCCFFB-D362-41DD-A59E-743447C7F66E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +35,10 @@ Global
{0F10B8B3-0C6E-4CB7-ADA5-C0429D654974}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F10B8B3-0C6E-4CB7-ADA5-C0429D654974}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F10B8B3-0C6E-4CB7-ADA5-C0429D654974}.Release|Any CPU.Build.0 = Release|Any CPU
{5BCCCFFB-D362-41DD-A59E-743447C7F66E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BCCCFFB-D362-41DD-A59E-743447C7F66E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BCCCFFB-D362-41DD-A59E-743447C7F66E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BCCCFFB-D362-41DD-A59E-743447C7F66E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System.Activities.DesignViewModels;
using System.Activities;

namespace UiPath.Activities.Credentials.ViewModels.Helpers
{
//We need to reference System.Activities in order for the view models to work
internal static class LocalResourceHelper
{
public static object GetNormalizedLocalPath(string updatedPropertyName, string targetPropertyName, object value)
{
if (targetPropertyName.Equals(updatedPropertyName))
{
var argument = value as InArgument<string>;
return argument?.GetNormalizedPath();
}
return value;
}

public static InArgument<string> GetNormalizedPath(this InArgument<string> argument)
{
if (argument == null || argument.Expression == null || !argument.Expression.IsLiteral())
{
return argument;
}

string path = argument.Expression.ToString();
return path.GetNormalizedPathInternal();
}

public static InArgument<string> GetNormalizedPath(this DesignInArgument<string> argument)
{
if (!argument.TryGetLiteralValue(out var value))
{
return argument.Value;
}

string path = (string)value;
return path.GetNormalizedPathInternal();
}

private static InArgument<string> GetNormalizedPathInternal(this string path)
{
if (!string.IsNullOrWhiteSpace(path))
{
path = path.Replace('\\', '/').Replace("//", "/");
}
return path;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
{
"activities": [
{
"fullName": "UiPath.Credentials.Activities.AddCredential",
"shortName": "AddCredential",
"displayNameKey": "Activity_AddCredential_Property_AddCredentialDisplayName_Name",
"descriptionKey": "Activity_AddCredential_Property_AddCredentialDescription_Description",
"displayNameAliasKeys": [
],
"iconKey": "CredentialsIcon.svg",
"viewModelType": "UiPath.Activities.Credentials.ViewModels.AddCredentialViewModel",
"codedWorkflowSupport": false,
"properties": [
{
"name": "Target",
"displayNameKey": "TargetDisplayName",
"tooltipKey": "TargetDescription",
"isRequired": true,
"isVisible": true,
"isPrincipal": true,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Username",
"displayNameKey": "UsernameDisplayName",
"tooltipKey": "UsernameDescription",
"isRequired": true,
"isVisible": true,
"isPrincipal": true,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "CredentialType",
"displayNameKey": "Activity_AddCredential_Property_CredentialType_Name",
"tooltipKey": "Activity_AddCredential_Property_CredentialType_Description",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Password",
"displayNameKey": "PasswordDisplayName",
"tooltipKey": "PasswordDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "PersistanceType",
"displayNameKey": "PersistanceTypeDisplayName",
"tooltipKey": "PersistanceTypeDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "PasswordSecureString",
"displayNameKey": "PasswordSecureStringDisplayName",
"tooltipKey": "PasswordSecureStringDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Result",
"displayNameKey": "Result",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
}
]
},
{
"fullName": "UiPath.Credentials.Activities.DeleteCredential",
"shortName": "AddCredential",
"displayNameKey": "Activity_DeleteCredential_Property_DeleteCredentialDisplayName_Name",
"descriptionKey": "Activity_DeleteCredential_Property_DeleteCredentialDescription_Description",
"displayNameAliasKeys": [
],
"iconKey": "CredentialsIcon.svg",
"viewModelType": "UiPath.Activities.Credentials.ViewModels.DeleteCredentialViewModel",
"codedWorkflowSupport": false,
"properties": [
{
"name": "Target",
"displayNameKey": "TargetDisplayName",
"tooltipKey": "TargetDescription",
"isRequired": true,
"isVisible": true,
"isPrincipal": true,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Result",
"displayNameKey": "Result",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
}
]
},
{
"fullName": "UiPath.Credentials.Activities.GetSecureCredential",
"shortName": "AddCredential",
"displayNameKey": "Activity_GetSecureCredential_Property_GetSecureCredentialDisplayName_Name",
"descriptionKey": "Activity_GetSecureCredential_Property_GetSecureCredentialDescription_Description",
"displayNameAliasKeys": [
],
"iconKey": "CredentialsIcon.svg",
"viewModelType": "UiPath.Activities.Credentials.ViewModels.GetSecureCredentialViewModel",
"codedWorkflowSupport": false,
"properties": [
{
"name": "Target",
"displayNameKey": "TargetDisplayName",
"tooltipKey": "TargetDescription",
"isRequired": true,
"isVisible": true,
"isPrincipal": true,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "CredentialType",
"displayNameKey": "Activity_AddCredential_Property_CredentialType_Name",
"tooltipKey": "Activity_AddCredential_Property_CredentialType_Description",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "PersistanceType",
"displayNameKey": "PersistanceTypeDisplayName",
"tooltipKey": "PersistanceTypeDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Password",
"displayNameKey": "PasswordDisplayName",
"tooltipKey": "PasswordDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Outpu",
"displayNameKey": "Output"
}
},
{
"name": "Result",
"displayNameKey": "Result",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
},
{
"name": "Username",
"displayNameKey": "UsernameDisplayName",
"tooltipKey": "UsernameDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
}
]
},
{
"fullName": "UiPath.Credentials.Activities.RequestCredential",
"shortName": "AddCredential",
"displayNameKey": "Activity_RequestCredential_Property_RequestCredentialDisplayName_Name",
"descriptionKey": "Activity_RequestCredential_Property_RequestCredentialDescription_Description",
"displayNameAliasKeys": [
],
"iconKey": "CredentialsIcon.svg",
"viewModelType": "UiPath.Activities.Credentials.ViewModels.RequestCredentialViewModel",
"codedWorkflowSupport": false,
"properties": [
{
"name": "Message",
"displayNameKey": "MessageDisplayName",
"tooltipKey": "MessageDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Title",
"displayNameKey": "TitleDisplayName",
"tooltipKey": "TitleDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Input",
"displayNameKey": "Input"
}
},
{
"name": "Password",
"displayNameKey": "PasswordDisplayName",
"tooltipKey": "PasswordDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
},
{
"name": "Result",
"displayNameKey": "Result",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
},
{
"name": "PasswordSecureString",
"displayNameKey": "PasswordSecureStringDisplayName",
"tooltipKey": "PasswordSecureStringDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
},
{
"name": "Username",
"displayNameKey": "UsernameDisplayName",
"tooltipKey": "UsernameDescription",
"isRequired": false,
"isVisible": true,
"isPrincipal": false,
"category": {
"name": "Output",
"displayNameKey": "Output"
}
}
]
}
],
"defaultActivityNameBackgroundColor": "#00489D",
"defaultActivityColor": "#00489D",
"defaultActivityIconKey": "CredentialsIcon.svg",
"assemblyIconKey": "CredentialsIcon.svg",
"resourceManagerName": "UiPath.Credentials.Activities.Properties.UiPath.Credentials.Activities"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 514fd2b

Please sign in to comment.