mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
The move!
This commit is contained in:
parent
1daf480b1b
commit
25526cc4d9
1147 changed files with 85 additions and 8524 deletions
|
@ -1,41 +0,0 @@
|
|||
using AutoMapper;
|
||||
using System;
|
||||
using System.Security.Claims;
|
||||
using Ombi.Core.Models.UI;
|
||||
|
||||
namespace Ombi.Mapping
|
||||
{
|
||||
public class StringToDateTimeConverter : ITypeConverter<string, DateTime>
|
||||
{
|
||||
|
||||
public DateTime Convert(string source, DateTime destination, ResolutionContext context)
|
||||
{
|
||||
DateTime dateTime;
|
||||
|
||||
if (string.IsNullOrEmpty(source))
|
||||
{
|
||||
return default(DateTime);
|
||||
}
|
||||
|
||||
if (DateTime.TryParse(source.ToString(), out dateTime))
|
||||
{
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
return default(DateTime);
|
||||
}
|
||||
}
|
||||
|
||||
public class ClaimsConverter : ITypeConverter<Claim, ClaimCheckboxes>
|
||||
{
|
||||
|
||||
public ClaimCheckboxes Convert(Claim source, ClaimCheckboxes destination, ResolutionContext context)
|
||||
{
|
||||
return new ClaimCheckboxes
|
||||
{
|
||||
Enabled = true,
|
||||
Value = source.Value
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue