Пример #1
0
        public IArchitectureFactory LookupArchitecture(Port port)
        {
            ReadOnlyCollection <IArchitectureFactory> entry = archTable.LookupEntity(port.Entity);

            for (int i = 0; i < entry.Count; i++)
            {
                IArchitectureFactory factory = entry[i];
                if (factory.SupportsPort(port))
                {
                    return(factory);
                }
            }
            throw new MathNet.Symbolics.Backend.Exceptions.ArchitectureNotAvailableException(port);
        }
Пример #2
0
        public bool ContainsArchitecture(Port port)
        {
            if (!archTable.ContainsEntity(port.Entity))
            {
                return(false);
            }

            ReadOnlyCollection <IArchitectureFactory> entry = archTable.LookupEntity(port.Entity);

            for (int i = 0; i < entry.Count; i++)
            {
                IArchitectureFactory factory = entry[i];
                if (factory.SupportsPort(port))
                {
                    return(true);
                }
            }

            return(false);
        }