Skip to content

Commit

Permalink
added display attributes on some providers and properties
Browse files Browse the repository at this point in the history
  • Loading branch information
trembon committed Feb 26, 2018
1 parent e9865c5 commit fbc2d53
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 8 deletions.
3 changes: 3 additions & 0 deletions JustABackup.Plugin.MSSQL/JustABackup.Plugin.MSSQL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
</ItemGroup>

<ItemGroup>
<Reference Include="System.ComponentModel.Annotations">
<HintPath>..\..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
<Reference Include="System.Data.SqlClient">
<HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.data.sqlclient\4.4.0\ref\netstandard2.0\System.Data.SqlClient.dll</HintPath>
</Reference>
Expand Down
3 changes: 3 additions & 0 deletions JustABackup.Plugin.MSSQL/MSSQLBackupProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Threading.Tasks;

namespace JustABackup.Plugin.MSSQL
{
[DisplayName("Microsoft SQL Backup")]
public class MSSQLBackupProvider : IBackupProvider
{
public string Server { get; set; }
Expand All @@ -20,6 +22,7 @@ public class MSSQLBackupProvider : IBackupProvider
[PasswordPropertyText]
public string Password { get; set; }

[Display(Name = "Temporary .bak file", Description = "Temporary file stored on the SQL server")]
public string TemporaryBakFile { get; set; }


Expand Down
1 change: 1 addition & 0 deletions JustABackup.Plugin.MySQL/MySQLBackupProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace JustABackup.Plugin.MySQL
{
[DisplayName("MySQL Backup")]
public class MySQLBackupProvider : IBackupProvider
{
public string Server { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@
<ProjectReference Include="..\JustABackup.Base\JustABackup.Base.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.ComponentModel.Annotations">
<HintPath>..\..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
12 changes: 8 additions & 4 deletions JustABackup.Plugin.OneDrive/OneDriveAuthenticationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web;

namespace JustABackup.Plugin.OneDrive
{
[DisplayName("OneDrive Authentication")]
public class OneDriveAuthenticationProvider : IAuthenticationProvider<IOneDriveClient>
{
private string callbackUrl;

private Action<string> storeSession;

[Display(Name = "Client ID")]
public string ClientID { get; set; }

[PasswordPropertyText]
[Display(Name = "Client Secret")]
public string ClientSecret { get; set; }

private string callbackUrl;

private Action<string> storeSession;

public void Initialize(string callbackUrl, Action<string> storeSession)
{
this.callbackUrl = callbackUrl;
Expand Down
2 changes: 2 additions & 0 deletions JustABackup.Plugin.OneDrive/OneDriveStorageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
using Microsoft.OneDrive.Sdk;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Threading.Tasks;

namespace JustABackup.Plugin.OneDrive
{
[DisplayName("OneDrive Storage")]
public class OneDriveStorageProvider : IStorageProvider
{
public string Folder { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using JustABackup.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Security.Cryptography;
Expand All @@ -9,16 +10,18 @@

namespace JustABackup.Plugin.RijndaelEncryptTransformer
{
[DisplayName("Encryption Transformer (Rijndael)")]
public class RijndaelEncryptTransformer : ITransformProvider
{
[PasswordPropertyText]
[Display(Name = "Encryption key")]
public string EncyptionKey { get; set; }

private const int KEYSIZE = 128;
private const int ITERATIONS = 1000;

private List<Stream> streams;

[Display(Name = "Encryption key")]
public string EncyptionKey { get; set; }


public RijndaelEncryptTransformer()
{
streams = new List<Stream>();
Expand Down
2 changes: 2 additions & 0 deletions JustABackup.Plugin.ZipTransformer/ZipTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
using JustABackup.Base.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.IO.Compression;
using System.Threading.Tasks;

namespace JustABackup.Plugin.ZipTransformer
{
[DisplayName("Zip Transformer")]
public class ZipTransformer : ITransformProvider
{
[Transform]
Expand Down

0 comments on commit fbc2d53

Please sign in to comment.