コード例 #1
0
        public override bool CompareKeyParams(IDictionary <string, object> pars)
        {
            if (!compareItemKey(DictHelper.Get(pars, "Item"), LinkedObject))
            {
                return(false);
            }
            if (!compareObjectKey(DictHelper.Get(pars, "ViewType"), ViewType))
            {
                return(false);
            }
            if (!compareStringKey(DictHelper.Get(pars, "FileFullPath"), FileFullPath))
            {
                return(false);
            }
            if (!compareStringKey(DictHelper.Get(pars, "WebEntityInfoPropertyName"), WebEntityInfoPropertyName))
            {
                return(false);
            }
            if (!compareObjectKey(DictHelper.Get(pars, "BrowserPrivateType"), BrowserPrivateType))
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
        public override void SetKeyParams(IDictionary <string, object> pars)
        {
            base.SetKeyParams(pars);

            if (pars == null)
            {
                return;
            }

            object t = DictHelper.Get(pars, "SourceObjectType");

            if (t != null && t is Type)
            {
                SourceObjectType = t as Type;
            }
            else if (t != null && t is string)
            {
                string typeName = t as string;
                SourceObjectType = TypeHelper.FindType(typeName);
            }
            else if (t != null)
            {
                throw new ArgumentException();
            }
        }
コード例 #3
0
 public override bool CompareKeyParams(IDictionary <string, object> pars)
 {
     if (!compareObjectKey(DictHelper.Get(pars, "SourceObjectType"), SourceObjectType))
     {
         return(false);
     }
     return(true);
 }
コード例 #4
0
 public override bool CompareKeyParams(IDictionary <string, object> pars)
 {
     //keys в данном методе являются только объектами, но не стрингами
     if (!compareJobKey(DictHelper.Get(pars, "RunningJob"), RunningJob))
     {
         return(false);
     }
     return(true);
 }
コード例 #5
0
 public override bool CompareKeyParams(IDictionary <string, object> pars)
 {
     //keys in this method are only objects, but not strings
     if (!compareJobKey(DictHelper.Get(pars, "RunningJob"), RunningJob))
     {
         return(false);
     }
     return(true);
 }
コード例 #6
0
        public virtual void SetKeyParams(IDictionary <string, object> pars)
        {
            object t = DictHelper.Get(pars, PersistStringDlgModeParameter);

            if (t != null && t is bool)
            {
                DlgMode = (bool)t;
            }
            else if (t != null && t is string)
            {
                DlgMode = bool.Parse(t as string);
            }
        }
コード例 #7
0
        public override void SetKeyParams(IDictionary <string, object> pars)
        {
            if (pars == null)
            {
                return;
            }

            object t = DictHelper.Get(pars, "RunningJob");

            if (t != null && t is JRunningJob)
            {
                RunningJob = t as JRunningJob;
            }
            else if (t != null && t is string)
            {
                RunningJob = Dm.Instance.Find <JRunningJob>(t as string);
                //todo load log
            }
            else if (t != null)
            {
                throw new ArgumentException();
            }
        }
コード例 #8
0
        public override void SetKeyParams(IDictionary <string, object> pars)
        {
            base.SetKeyParams(pars);

            if (pars == null)
            {
                return;
            }
            object t = DictHelper.Get(pars, "Item");

            if (t != null)
            {
                if (t != null && t is string)
                {
                    object typeStr = DictHelper.Get(pars, "ItemType");
                    if (typeStr != null && typeStr is string)
                    {
                        LinkedObject = Dm.Instance.FindTypeAddFindInstance(typeStr as string, t as string);
                    }
                    else
                    {
                        throw new ArgumentException();
                    }
                }
                else
                {
                    LinkedObject = t;
                }
            }

            t = DictHelper.Get(pars, "ViewType");
            if (t != null && t is ViewType)
            {
                ViewType = (ViewType)t;
            }
            else if (t != null && t is string)
            {
                ViewType = (t as string).ToEnum(ViewType.NONE);
            }
            else if (t != null)
            {
                throw new ArgumentException();
            }

            t = DictHelper.Get(pars, "FileFullPath");
            if (t != null)
            {
                FileFullPath = t as string;
            }

            t = DictHelper.Get(pars, "WebEntityInfoPropertyName");
            if (t != null)
            {
                WebEntityInfoPropertyName = t as string;
            }

            t = DictHelper.Get(pars, "BrowserPrivateType");
            if (t != null && t is BrowserPrivateType)
            {
                BrowserPrivateType = (BrowserPrivateType)t;
            }
            else if (t != null && t is string)
            {
                BrowserPrivateType = (t as string).ToEnum(BrowserPrivateType.COMMON_CACHE);
            }
            else if (t != null)
            {
                throw new ArgumentException();
            }
        }