Version 3.0.337

This commit is contained in:
Anja Müller-Meißner 2022-08-30 15:42:25 +02:00
parent fd0e63cf10
commit 573fe77e12
2336 changed files with 33688 additions and 86082 deletions

View file

@ -0,0 +1,19 @@
using System.Collections.Generic;
namespace TINK.Model.MiniSurvey
{
public interface IMiniSurveyModel
{
/// <summary> Holds the title of the mini survey. </summary>
string Title { get; set; }
/// <summary> Holds the sub title of the mini survey. </summary>
string Subtitle { get; set; }
/// <summary> Holds the footer of the mini survey. </summary>
string Footer { get; set; }
/// <summary> Holds the questions. </summary>
IDictionary<string, IQuestionModel> Questions { get; }
}
}

View file

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace TINK.Model.MiniSurvey
{
public interface IQuestionModel
{
/// <summary> Holds the query description. </summary>
string Text { get; set; }
/// <summary> Holds the type of the question. </summary>
MiniSurveyModel.Type Type { get; set; }
/// <summary>Holds the collection of possible answers.</summary>
Dictionary<string, string> PossibleAnswers { get; }
}
}

View file

@ -6,34 +6,29 @@ namespace TINK.Model.MiniSurvey
/// <summary>
/// Holds mini survey.
/// </summary>
public class MiniSurveyModel
public class MiniSurveyModel : IMiniSurveyModel
{
public MiniSurveyModel(Dictionary<string, IQuestionModel> questions = null)
{
Questions = questions ?? new Dictionary<string, IQuestionModel>();
}
public enum Type
{
SingleAnswer,
CustomText
}
public class QuestionModel
{
/// <summary>
/// Holds the query description.
/// </summary>
public string Text { get; set; }
public Type Type { get; set; }
/// <summary>
/// Holds the collection of possible answers.
/// </summary>
public Dictionary<string, string> PossibleAnswers { get; private set; } = new Dictionary<string, string>();
}
/// <summary> Holds the title of the mini survey. </summary>
public string Title { get; set; }
/// <summary> Holds the sub title of the mini survey. </summary>
public string Subtitle { get; set; }
/// <summary> Holds the footer of the mini survey. </summary>
public string Footer { get; set; }
public Dictionary<string, QuestionModel> Questions { get; } = new Dictionary<string, QuestionModel>();
/// <summary> Holds the questions. </summary>
public IDictionary<string, IQuestionModel> Questions { get; }
}
}

View file

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace TINK.Model.MiniSurvey
{
public class QuestionModel : IQuestionModel
{
/// <summary> Holds the query description. </summary>
public string Text { get; set; }
/// <summary> Holds the type of the question. </summary>
public MiniSurveyModel.Type Type { get; set; }
/// <summary>Holds the collection of possible answers.</summary>
public Dictionary<string, string> PossibleAnswers { get; private set; } = new Dictionary<string, string>();
}
}