61 lines
2.1 KiB
C#
61 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.ServiceModel;
|
|
using BeWo.Data;
|
|
using BeWo.Service.Plugins;
|
|
using BS.Shared.DataContracts.Compact;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Service.Core;
|
|
using BeWo.Service.DCEntityMapper;
|
|
using BeWo.Service.ServiceContracts;
|
|
|
|
using BS.Shared;
|
|
using BS.Shared.Core;
|
|
using BS.Shared.DataContracts;
|
|
using BS.SharedLauncher;
|
|
|
|
using BeWo.Service.Invoicing;
|
|
using System.IO;
|
|
using System.Configuration;
|
|
using System.Diagnostics;
|
|
|
|
namespace BeWo.Service.ServiceImplementations
|
|
{
|
|
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
|
public class EnumTranslationServiceImp : IEnumTranslationService
|
|
{
|
|
Dictionary<string, Dictionary<object, string>> TranslationDictionary;
|
|
|
|
Dictionary<object, string> PasswordValidationDict = new Dictionary<object, string>
|
|
{
|
|
{ PasswordValidationResult.NotCorrect, "Das angegebene Passwort ist nicht korrekt!"},
|
|
{ PasswordValidationResult.NotLongEnough, "Das Passwort muss mindestens 8 Zeichen lang sein!"},
|
|
{ PasswordValidationResult.NotSpecialEnough, "Das Passwort muss mindestens drei Zeichen aus der Gruppe Sonderzeichen, Zahlen, Groß- und Kleinbuchstaben enthalten."},
|
|
{ PasswordValidationResult.ImFunnyAndUsingBewoAsPasswordSmile, "Das Passwort ist nicht sicher genug."},
|
|
{ PasswordValidationResult.AreTheSame, "Das Passwort hat sich nicht geändert"},
|
|
{ PasswordValidationResult.Succesful, ""},
|
|
};
|
|
|
|
public EnumTranslationServiceImp()
|
|
{
|
|
TranslationDictionary = new Dictionary<string, Dictionary<object, string>>
|
|
{
|
|
{nameof(PasswordValidationResult), PasswordValidationDict}
|
|
};
|
|
}
|
|
|
|
public string GetTranslation(string e, short value)
|
|
{
|
|
try
|
|
{
|
|
return TranslationDictionary[e][value];
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw Core.Utils.CreateBeWoFaultException(ex);
|
|
}
|
|
}
|
|
}
|
|
} |