Пример #1
0
        public InstanceIdSet ConvertAllToInstanceIds(Converter <Bus, Guid> convert)
        {
            InstanceIdSet ids = new InstanceIdSet();

            foreach (Bus b in this)
            {
                ids.Add(convert(b));
            }
            return(ids);
        }
Пример #2
0
        public static BusSet ConvertAllFromInstanceIds(InstanceIdSet idSet, Converter <Guid, Bus> convert)
        {
            BusSet bs = new BusSet();

            foreach (Guid id in idSet)
            {
                bs.Add(convert(id));
            }
            return(bs);
        }
Пример #3
0
        public InstanceIdSet ConvertAllToInstanceIds()
        {
            InstanceIdSet ids = new InstanceIdSet();

            foreach (Bus b in this)
            {
                ids.Add(b.InstanceId);
            }
            return(ids);
        }
Пример #4
0
        public InstanceIdSet ConvertAllToInstanceIds(Converter <Port, Guid> convert)
        {
            InstanceIdSet ids = new InstanceIdSet();

            foreach (Port p in this)
            {
                ids.Add(convert(p));
            }
            return(ids);
        }
Пример #5
0
        public static PortSet ConvertAllFromInstanceIds(InstanceIdSet idSet, Converter <Guid, Port> convert)
        {
            PortSet ps = new PortSet();

            foreach (Guid id in idSet)
            {
                ps.Add(convert(id));
            }
            return(ps);
        }
Пример #6
0
        public InstanceIdSet ConvertAllToInstanceIds(Converter <Signal, Guid> convert)
        {
            InstanceIdSet ids = new InstanceIdSet();

            foreach (Signal s in this)
            {
                ids.Add(convert(s));
            }
            return(ids);
        }
Пример #7
0
        public static SignalSet ConvertAllFromInstanceIds(InstanceIdSet idSet, Converter <Guid, Signal> convert)
        {
            SignalSet ss = new SignalSet();

            foreach (Guid id in idSet)
            {
                ss.Add(convert(id));
            }
            return(ss);
        }
Пример #8
0
        public static InstanceIdSet ConvertFrom(Set <Guid> set)
        {
            InstanceIdSet ss = set as InstanceIdSet;

            if (ss == null)
            {
                return(new InstanceIdSet((IList <Guid>)set));
            }
            else
            {
                return(ss);
            }
        }