Commit 06293575 authored by Colin Kiama's avatar Colin Kiama

Will refrain from using generics from the Query class as it would be more...

Will refrain from using generics from the Query class as it would be more complicated to implement than convinent.

Will utilise inheritance instead to add unique capabilities for specific queries
parent a6dd5454
......@@ -5,11 +5,26 @@ using System.Text;
namespace ProductHuntAPI.Model
{
public class Query<T>
public class Query
{
public Query<T> AddParameter<T>(Query<T> formerQuery) where T : IVotable
public string FieldName { get; private set; }
private Dictionary<string, object> _parameterDictionary = new Dictionary<string, object>();
public List<Query> ChildQueries = new List<Query>();
public Query(string fieldName)
{
FieldName = fieldName;
}
public Query AddParameter()
{
return this;
}
public Query AddChildQuery(Query queryToAdd)
{
throw new NotImplementedException();
ChildQueries.Add(queryToAdd);
return queryToAdd;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment