mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-13 10:57:13 +00:00
51 lines
1012 B
C#
51 lines
1012 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
|
|
namespace GraphifyDemo
|
|
{
|
|
public interface IProcessor
|
|
{
|
|
List<string> Process(List<string> items);
|
|
}
|
|
|
|
public class Processor
|
|
{
|
|
}
|
|
|
|
public class Result<T>
|
|
{
|
|
}
|
|
|
|
public class DataProcessor : Processor, IProcessor
|
|
{
|
|
private readonly HttpClient _client;
|
|
|
|
public DataProcessor()
|
|
{
|
|
_client = new HttpClient();
|
|
}
|
|
|
|
public List<string> Process(List<string> items)
|
|
{
|
|
return Validate(items);
|
|
}
|
|
|
|
public Result<DataProcessor> Build(HttpClient client)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
private List<string> Validate(List<string> items)
|
|
{
|
|
var result = new List<string>();
|
|
foreach (var item in items)
|
|
{
|
|
if (!string.IsNullOrEmpty(item))
|
|
result.Add(item.Trim());
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
}
|