public static void RunInvertibleMultiDemo() { Source source = new Source(); MultiDestination dest = new MultiDestination(); var swapper = new SwapArrow <int, int>(); BindingsManager.CreateBinding(BindingsManager.Sources(source.GetBindPoint("source"), source.GetBindPoint("multiplies")), swapper, BindingsManager.Destinations(dest.GetBindPoint("leftResult"), dest.GetBindPoint("rightResult"))); source.source = 3; source.multiplies = 4; if (dest.leftResult == source.multiplies && dest.rightResult == source.source) { Console.WriteLine("Invertible multibindings work!"); } else { Console.WriteLine("Invertible multibindings do not work D:"); } }
public static void RunInvertibleMultiDemo() { Source source = new Source(); MultiDestination dest = new MultiDestination(); var swapper = new SwapArrow<int, int>(); BindingsManager.CreateBinding(BindingsManager.Sources(source.GetBindPoint("source"), source.GetBindPoint("multiplies")), swapper, BindingsManager.Destinations(dest.GetBindPoint("leftResult"), dest.GetBindPoint("rightResult"))); source.source = 3; source.multiplies = 4; if (dest.leftResult == source.multiplies && dest.rightResult == source.source) { Console.WriteLine("Invertible multibindings work!"); } else { Console.WriteLine("Invertible multibindings do not work D:"); } }