Exemple #1
0
        public void Create()
        {
            var result = StateResult.Create(5, "A");

            Assert.AreEqual(5, result.State);
            Assert.AreEqual("A", result.Value);
        }
Exemple #2
0
 State <string, int> DoSomething()
 {
     return(state => StateResult.Create(state + ", Wo", 2));
 }
Exemple #3
0
 State <string, int> DoSomethingElse()
 {
     return(state => StateResult.Create(state + "rld", 1));
 }
Exemple #4
0
 static State <Unit, S> Put <S>(S state)
 {
     return(_ => StateResult.Create <Unit, S>(Unit.Default, state));
 }
 private static State <int, int> ThirdOperation()
 {
     return(state => StateResult.Create(state + 2, 55));
 }
 private static State <int, string> SecondOperation(string value)
 {
     return(state => StateResult.Create(state + 1, value + "B"));
 }
 private static State <int, string> FirstOperation()
 {
     return(state => StateResult.Create(state, "A"));
 }