Exemple #1
0
 public EcmPluginParams(Parser p, Setting s, EcmProject e, MarkedData incoming, int calledCount)
 {
     myParser = p;
     mySetting = s;
     myProject = e;
     myMarkedData = incoming;
     myCalledCount = calledCount;
 }
Exemple #2
0
 // �R���X�g���N�^
 public ExportManager(Parser p, EcmItem item)
 {
     myParser = p;
     myItem = item;
 }
Exemple #3
0
        // �ꊇpublish����s���܂��B
        private void ExecuteAllParse()
        {
            myParseFlag = true;
            string logFile = GetTempLogName();
            string resultFile = GetResultLogName();

            FileInfo abortCommandFile = new FileInfo(GetAbortCommandFileName());
            DateTime startTime = DateTime.Now;

            try{
                EcmItem[] items = myProject.GetAllItems();
                myCounter = 0;
                myCounterMax = items.Length;

                foreach(EcmItem i in  items){
                    if(i.ParsePermit == false){
                        string mes = string.Format("{0} : {1} ��X�L�b�v���܂� (publish�����{2}�𖞂����܂���)�B\n\n", DateTime.Now, i, myProject.Setting.ParsePermissonRule);
                        Util.AppendWriteFile(logFile, mes);
                        continue;
                    }

                    // �p�[�T��p��
                    Parser p = new Parser(myProject);
                    // information �͋L�^���Ȃ�
                    p.Log.MinimumErrorLevel = EcmErrorLevel.Important;

                    ProcessResult pr = p.Process(i);
                    Interlocked.Increment(ref myCounter);

                    string parseStartMes = string.Format("{0} : {1} publish�J�n\n", DateTime.Now, i);
                    Util.AppendWriteFile(logFile, parseStartMes);
                    Util.AppendWriteFile(logFile, p.Log.ToString());
                    if(p.Log.ErrorLevel < EcmErrorLevel.Error){
                        string parseEndMes = string.Format("{0} : {1} publish����\n", DateTime.Now, i);
                        Util.AppendWriteFile(logFile, parseEndMes);
                    }
                    Util.AppendWriteFile(logFile, string.Format("{0} : {1}\n", i, pr.Message));

                    // ���f�R�}���h�����߂���Ă����璆�~����
                    abortCommandFile.Refresh();
                    if(abortCommandFile.Exists){
            //						Util.AppendWriteFile(logFile, string.Format("{0} / {1}", abortCommandFile.LastWriteTime , startTime));
                        if(abortCommandFile.LastWriteTime > startTime){
                            Util.AppendWriteFile(logFile, myProject.Id + " : AllParse aborted");
                            return;
                        }
                    }
                }
                Util.AppendWriteFile(logFile, myProject.Id + " : AllParse end");
            } catch(Exception e) {
                Util.AppendWriteFile(logFile, e.ToString());
            } finally {
                File.Copy(logFile, resultFile, true);
                File.Delete(logFile);
                myParseFlag = false;
            }
        }
Exemple #4
0
 // �C�ӂ̖��O��Export�̈��擾���܂��B
 // �t�@�C�����Ȃ��ꍇ�A�Y���̗̈悪�Ȃ��ꍇ�� null ��Ԃ��܂��B
 public string GetExport(Parser p, string exportName)
 {
     if(!File.Exists) return null;
     ExportManager tempExp = new ExportManager(p, this);
     tempExp.Parse(this.ReadContent());
     string expTarget = tempExp[exportName];
     return expTarget;
 }