1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-13 00:28:10 -05:00

added meta property and service for clients

started workign on a new profile page for clients
This commit is contained in:
RaidMax
2018-02-14 13:01:26 -06:00
parent 0d3354051b
commit 7a15980a0c
14 changed files with 594 additions and 22 deletions

View File

@ -0,0 +1,27 @@
using SharedLibrary.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SharedLibrary.Services
{
public class MetaService
{
private static List<Func<int, Task<List<ProfileMeta>>>> MetaActions = new List<Func<int, Task<List<ProfileMeta>>>>();
public static void AddMeta(Func<int, Task<List<ProfileMeta>>> metaAction)
{
MetaActions.Add(metaAction);
}
public static async Task<List<ProfileMeta>> GetMeta(int clientId)
{
var meta = new List<ProfileMeta>();
foreach (var action in MetaActions)
meta.AddRange(await action(clientId));
return meta;
}
}
}