private static void VoteQuestion(UnverQuestion question) { var Question5 = new VerQuestion().V1Question(question); Question5.Match( QuestionVote => { new VoteQuestion().SendPermisiuneToVote(QuestionVote); return(Unit.Default); }, ex => { Console.WriteLine("Can t Vote Question"); return(Unit.Default); } ); }
static void Main(string[] args) { var questionResult = UnverQuestion.Create("Yes", new List <string>() { "yes1", "yes2" }); questionResult.Match( Succ: question => { VoteQuestion(question); Console.WriteLine("good to vote "); return(Unit.Default); }, Fail: ex => { Console.WriteLine($"Error. Reason: {ex.Message}"); return(Unit.Default); } ); Console.ReadLine(); }
public Result <V1Question> VQuestion(UnverQuestion question) { return(new GoodQuestion(question.Question, question.Tags)); }