Exemple #1
0
        internal static CollectionsTaskLocal MessageToLocalTask(string message)
        {
            string[] fields = message.Split('\t');

            CollectionsTaskLocal task = new CollectionsTaskLocal();

            task.Id      = fields[0];
            task.Created = fields[1];
            task.Project = fields[2];
            task.Source  = fields[3];
            task.State   = fields[4];

            task.Issued  = fields[5];
            task.Command = fields[6];
            task.Target  = fields[7];

            task.Collected          = fields[8];
            task.CollectionsStation = fields[9];
            task.CollectorInstance  = fields[10];

            task.BlobName  = fields[11];
            task.Processed = fields[12];

            return(task);
        }
Exemple #2
0
        internal static string LocalTaskToMessage(CollectionsTaskLocal task)
        {
            string message = string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}\t{11}\t{12}",
                                           task.Id,
                                           task.Created,
                                           task.Project,
                                           task.Source,
                                           task.State,

                                           task.Issued,
                                           task.Command,
                                           task.Target,

                                           task.Collected,
                                           task.CollectionsStation,
                                           task.CollectorInstance,

                                           task.BlobName,
                                           task.Processed);

            return(message);
        }