コード例 #1
0
ファイル: Pop3Core.cs プロジェクト: stjordanis/magix
        public static void magix_pop3_get_messages(object sender, ActiveEventArgs e)
        {
            Node ip = Ip(e.Params);

            if (ShouldInspect(ip))
            {
                AppendInspectFromResource(
                    ip["inspect"],
                    "Magix.email",
                    "Magix.email.hyperlisp.inspect.hl",
                    "[magix.pop3.get-messages-dox].value");
                AppendCodeFromResource(
                    ip,
                    "Magix.email",
                    "Magix.email.hyperlisp.inspect.hl",
                    "[magix.pop3.get-messages-sample]");
                return;
            }

            Node dp = Dp(e.Params);

            string linkedAttachmentDirectory = GetAttachmentDirectory(e.Params, ip, dp, "magix.email.linked-attachments-directory");
            string attachmentDirectory       = GetAttachmentDirectory(e.Params, ip, dp, "magix.email.attachments-directory");

            Node getBase = new Node();

            RaiseActiveEvent(
                "magix.file.get-base-path",
                getBase);
            string basePath = getBase["path"].Get <string>();

            Pop3Helper.GetMessages(e.Params, ip, dp, basePath, attachmentDirectory, linkedAttachmentDirectory);
        }
コード例 #2
0
ファイル: Pop3Core.cs プロジェクト: stjordanis/magix
        public static void magix_pop3_get_message_count(object sender, ActiveEventArgs e)
        {
            Node ip = Ip(e.Params);

            if (ShouldInspect(ip))
            {
                AppendInspectFromResource(
                    ip["inspect"],
                    "Magix.email",
                    "Magix.email.hyperlisp.inspect.hl",
                    "[magix.pop3.get-message-count-dox].value");
                AppendCodeFromResource(
                    ip,
                    "Magix.email",
                    "Magix.email.hyperlisp.inspect.hl",
                    "[magix.pop3.get-message-count-sample]");
                return;
            }

            Node dp = Dp(e.Params);

            ip["count"].Value = Pop3Helper.GetMessageCount(ip, dp);
        }