Пример #1
0
        internal bool ValidateParams(IExtractKthCoreParamMgr paramMgr, out int kValue, out Exception ex)
        {
            bool isValid = true;
            kValue = 1;
            ex = null;
            string mssg = null;
            if (paramMgr == null)
            {
                mssg = Standard.Properties.Resources.MssgParamMgrIsNull;
                isValid = false;
            }
            else
            {
                var results = paramMgr.Validate();
                if (!results.IsValid)
                {
                    var q = from e in results.Errors
                            select e.ErrorMessage;

                    mssg = string.Join(";", q.ToArray());
                }
                else
                {
                    kValue = paramMgr.K;
                }
            }
            if (!isValid)
            {
                FxArgumentException argEx = new FxArgumentException(mssg);
                argEx.FxId = Id;
                argEx.ParentElementId = ParentId;
                argEx.FxTypeName = GetType().FullName;
                ex = argEx;
            }
            return isValid;
        }
Пример #2
0
 public IParamsView CreateView(IExtractKthCoreParamMgr mgr)
 {
     return new ExtractKthCoreParamsCtrl(mgr.ParentId, mgr.Bag as IExtractKthCoreParamBag);
 }