Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public class FEDecoratorAttribute : Attribute
/// </summary>
public FeComponentType Type { get; set; }

/// <summary>
/// Set different text formats: SQL, JSON, PLAINTEXT, etc.
/// </summary>
public FeTextFormat TextFormat { get; set; } = FeTextFormat.PLAINTEXT;

/// <summary>
/// Property Row number. Used when showing the property in the Action configuration panel.
/// If not set, all properties will be placed on the same default row.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
namespace Ringhel.Procesio.Action.Core.Models.Credentials.DB
namespace Ringhel.Procesio.Action.Core.Models
{
public class DBCredentialsConfiguration
public class DbCredentialsConfiguration
{
public string ServerName { get; set; }
public DbClientType ServerType { get; set; }
public DbProtocolType ProtocolType { get; set; }
public int? PortNumber { get; set; }
public DbAuthenticationType AuthenticationType { get; set; }
public bool? Encrypt { get; set; }
public bool? Pooling { get; set; }
public bool? TrustServerCertificate { get; set; }
public string DatabaseName { get; set; }
public string Username { get; set; }
public string Password { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Data.Common;

namespace Ringhel.Procesio.Action.Core.Models.Credentials.DB
namespace Ringhel.Procesio.Action.Core.Models
{
public class DBCredentialsManager
public class DbCredentialsManager
{
public DBCredentialsConfiguration CredentialsConfiguration { get; set; }
public DbCredentialsConfiguration CredentialsConfiguration { get; set; }

public DbConnection Client { get; set; }
public IDbClient Client { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Ringhel.Procesio.Action.Core.Models
{
public enum DbAuthenticationType
{
CredentialsAuthentication = 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Ringhel.Procesio.Action.Core.Models
{
public enum DbClientType
{
MSSQL = 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Ringhel.Procesio.Action.Core.Models
{
public enum DbProtocolType
{
NONE = 1,
TCP = 2,
LPC = 3,
NP = 4
}
}
20 changes: 20 additions & 0 deletions Ringhel.Procesio.Action.Core/Models/Credentials/DB/IDbClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Data;
using System.Threading.Tasks;

namespace Ringhel.Procesio.Action.Core.Models
{
public interface IDbClient
{
/// <summary>
/// Execute a query that will return a list
/// </summary>
Task<DataSet> ExecuteQuery(string dbQuery);

/// <summary>
/// Execute a command that will return an int
/// Examples: COUNT, INSERT, UPDATE, ...
/// </summary>
/// <returns></returns>
Task<int> ExecuteCommand(string dbQuery);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Company>Ringhel</Company>
<Product>Procesio</Product>
<RepositoryUrl>https://github.com/PROCESIO/Action-Core.git</RepositoryUrl>
<Version>1.16.0.4</Version>
<Version>1.16.1.1</Version>
<AssemblyName>Ringhel.Procesio.Action.Core</AssemblyName>
<PackageId>Ringhel.Procesio.Action.Core</PackageId>
<RootNamespace>Ringhel.Procesio.Action.Core</RootNamespace>
Expand Down
10 changes: 10 additions & 0 deletions Ringhel.Procesio.Action.Core/Utils/FeTextFormat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Ringhel.Procesio.Action.Core.Utils
{
public enum FeTextFormat
{
NONE = 0,
PLAINTEXT = 1,
JSON = 2,
SQL = 3
}
}