コード例 #1
0
        private void LoadUserParameters(IEnumerable <TemplateNodeQueryInfo> queries, QueryDirectories queryDirectories)
        {
            QueryDirectoryBase          queryDirectory          = queryDirectories.QueryDirectory;
            QueryParameterDirectoryBase queryParameterDirectory = queryDirectories.QueryParameterDirectory;

            foreach (TemplateNodeQueryInfo queryInfo in queries)
            {
                foreach (ParameterValue paramInfo in queryInfo.ParameterValues)
                {
                    foreach (InstanceInfo instanceInfo in ConnectionGroup.Connections)
                    {
                        Int64?queryId = queryDirectory.GetQueryId(
                            this,
                            queryInfo,
                            instanceInfo,
                            DateTime.Now,
                            false
                            );

                        if (queryId.HasValue)
                        {
                            queryParameterDirectory.ReadParameter(
                                ConnectionGroup,
                                queryId.Value,
                                queryInfo,
                                paramInfo
                                );

                            break;
                        }
                    }
                }
            }
        }
コード例 #2
0
        public void LoadUserParameters(CurrentStorage storage)
        {
            QueryDirectories queryDirectories = QueryDirectories.GetInstance(storage, false);

            LoadUserParameters(Queries, queryDirectories);

            QueryDirectories groupQueryDirectories = QueryDirectories.GetInstance(storage, true);

            LoadUserParameters(GroupQueries, groupQueryDirectories);
        }