Beispiel #1
0
        public static ISchemeComponent GetDestination(SchemeView scheme, WireView wire)
        {
            var port = scheme.ExternalOutputs.FirstOrDefault(e => e.WireEndConnects(wire));
            var gate = scheme.Gates.FirstOrDefault(g => g.WireEndConnects(wire));

            // only one could be retrieved
            Debug.Assert(port == null ^ gate == null);
            Debug.Assert(port != null ^ gate != null);

            return(gate == null ? port : gate);
        }
Beispiel #2
0
 public WireDto(WireView view) => Connection = view.Connection;