Esempio n. 1
0
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

        /// <summary>
        /// Checks that all sources are ready.
        /// </summary>
        /// <param name="source">The node instance to check.</param>
        /// <param name="dataList">Optional data returned by each source.</param>
        public virtual bool AreAllSourcesReady(TSource source, out IDictionary <ISourceTemplate, object> dataList)
        {
            dataList = new Dictionary <ISourceTemplate, object>();
            bool IsReady = true;

            foreach (ISourceTemplate SourceTemplate in SourceTemplateList)
            {
                IsReady &= SourceTemplate.IsReady(source, out object data);
                dataList.Add(SourceTemplate, data);
            }

            return(IsReady);
        }
Esempio n. 2
0
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

        /// <summary>
        /// Gets all sources that are not ready.
        /// </summary>
        /// <param name="source">The node instance to check.</param>
        public virtual IList <ISourceTemplate> GetAllSourceTemplatesNotReady(TSource source)
        {
            IList <ISourceTemplate> Result = new List <ISourceTemplate>();

            foreach (ISourceTemplate SourceTemplate in SourceTemplateList)
            {
                if (!SourceTemplate.IsReady(source, out object data))
                {
                    Result.Add(SourceTemplate);
                }
            }

            return(Result);
        }
Esempio n. 3
0
        /// <summary>
        /// Clears the rule template state.
        /// </summary>
        public void Clear()
        {
            ErrorList.ClearErrors();

#if COVERAGE
            foreach (ISourceTemplate SourceTemplate in SourceTemplateList)
            {
                Debug.Assert(SourceTemplate.ToString() != null);
            }
            foreach (IDestinationTemplate DestinationTemplate in DestinationTemplateList)
            {
                Debug.Assert(DestinationTemplate.ToString() != null);
            }
#endif
        }