-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
13 changed files
with
558 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...ities/Credentials/UiPath.Credentials.Activities.ViewModels/Helpers/LocalResourceHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
309 changes: 309 additions & 0 deletions
309
...entials/UiPath.Credentials.Activities.ViewModels/Resources/ActivitiesMetadataWindows.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
5 changes: 5 additions & 0 deletions
5
...ls/UiPath.Credentials.Activities.ViewModels/Resources/Icons/CredentialsIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.