Пример #1
0
        public static IOamConfiguration GetConfigurationByIndex(
            string boardName,
            int boardNumber,
            int configIndex
            )
        {
            IOnlineSession        onlineSession = OnlineSession.GetOnlineSession();
            List <IOamLocalBoard> boards        = onlineSession.Boards;

            IOamLocalBoard          board = onlineSession.GetBoard(boardName, boardNumber);
            OamConfigurationScanner OCS   = new OamConfigurationScanner();

            OCS.Board = board;
            IEnumerable <IOamConfiguration> configs    = OCS.Scan();
            List <IOamConfiguration>        configList = new List <IOamConfiguration>(configs);
            IOamConfiguration config = configList[configIndex];

            return(config);
        }
Пример #2
0
        public static IOamConfiguration GetConfigurationByName(
            string configName
            )
        {
            IOnlineSession onlineSession = OnlineSession.GetOnlineSession();

            List <IOamLocalBoard> Boards = onlineSession.Boards;

            foreach (var board in Boards)
            {
                OamConfigurationScanner OCS = new OamConfigurationScanner();
                OCS.Board = board;
                IEnumerable <IOamConfiguration> configs    = OCS.Scan();
                List <IOamConfiguration>        configList = new List <IOamConfiguration>(configs);
                foreach (var config in configList)
                {
                    if (config.Name == configName)
                    {
                        return(config);
                    }
                }
            }
            return(null);
        }