Пример #1
0
        public static bool VerifySheets(WDBSheet[] sheets, out string[] errors)
        {
            errors = null;

            List <string> outputErrors = new List <string>();

            context.Add(WDBContextIENames.CONTEXT_ERRORS_NAME, outputErrors);
            context.Add(WDBContextIENames.CONTEXT_SHOW_AS_EXCEL, true);

            foreach (var sheet in sheets)
            {
                context.Add(sheet.Name, sheet);
            }

            foreach (var sheet in sheets)
            {
                VerifySheet(sheet);
            }

            if (outputErrors.Count > 0)
            {
                errors = outputErrors.ToArray();
            }

            context.Clear();
            fieldVerifyDic.Clear();

            return(errors == null);
        }
Пример #2
0
        public void Process()
        {
            string[] assets = Filter.GetResults();
            if (assets != null && assets.Length > 0)
            {
                StringContextContainer context = new StringContextContainer();
                context.Add(AssetPostContextKeys.ASSET_FILTER_KEY, Filter);
                context.Add(AssetPostContextKeys.ASSET_FILTER_RESULT_KEY, assets);

                foreach (var ruler in Rulers)
                {
                    context.InjectTo(ruler);
                    {
                        ruler.Execute();
                    }
                    context.ExtractFrom(ruler);
                }

                context.Clear();
            }
        }