コード例 #1
0
        private PostProcessing GetPostProcessing(NzbImportModel import)
        {
            if (Enum.IsDefined(typeof(PostProcessing), import.PostProcessing))
            {
                if (import.PostProcessing == -100)
                {
                    return(_category.Default().PostProcessing);
                }

                return((PostProcessing)import.PostProcessing); //If not supplied use default for this category/default
            }

            if (!String.IsNullOrEmpty(import.Category))
            {
                var category = _category.Find(import.Category);

                if (category != null)
                {
                    var pp = category.PostProcessing;

                    if (pp != null)
                    {
                        return(pp);
                    }
                }
            }

            return(_category.Default().PostProcessing);
        }