public void UsingClosureShouldWork() { var source = new MonoValue <string>(); var arg = "this is test."; source?.Exec(s => s.Val = arg); source.Val.Is(arg); source = null; source?.Exec(s => s.Val = "it is expected no exception throwing."); }
public void ExecWithTwoArgument <T>(T arg) { var source = new MonoValue <T>(); source?.Exec((s, v) => s.Val = v, arg); source.Val.Is(arg); source = null; source?.Exec((s, v) => s.Val = v, arg); // it is expected no exception throwing. }
public void ExecWithTwoArgumentString() { var arg = "this is test"; var source = new MonoValue <string>(); source?.Exec((s, v) => s.Val = v, arg); source.Val.Is(arg); source = null; source?.Exec((s, v) => s.Val = v, arg); // it is expected no exception throwing. }