Esempio n. 1
0
        public UschedEntry[] ResultShow()
        {
            UschedEntry[] entryList;

            unsafe {
                usched_entry *entry_list;
                uint          nmemb;

                usched_result_get_show(&entry_list, &nmemb);

                entryList = new UschedEntry[nmemb];

                for (int i = 0; i < nmemb; i++)
                {
                    entryList[i].Id       = entry_list[i].id;
                    entryList[i].Username = new string((sbyte *)entry_list[i].username);
                    entryList[i].UID      = entry_list[i].uid;
                    entryList[i].GID      = entry_list[i].gid;
                    entryList[i].Trigger  = entry_list[i].trigger;
                    entryList[i].Step     = entry_list[i].step;
                    entryList[i].Expire   = entry_list[i].expire;
                    entryList[i].Command  = new string((sbyte *)entry_list[i].subj);
                }

                usched_result_free_show();
            }

            return(entryList);
        }
Esempio n. 2
0
        public UschedEntry[] ResultShow()
        {
            UschedEntry[] entryList;

            unsafe {
                usched_entry *entry_list;
                uint nmemb;

                usched_result_get_show(&entry_list, &nmemb);

                entryList = new UschedEntry[nmemb];

                for (int i = 0; i < nmemb; i ++) {
                    entryList[i].Id = entry_list[i].id;
                    entryList[i].Username = new string((sbyte *) entry_list[i].username);
                    entryList[i].UID = entry_list[i].uid;
                    entryList[i].GID = entry_list[i].gid;
                    entryList[i].Trigger = entry_list[i].trigger;
                    entryList[i].Step = entry_list[i].step;
                    entryList[i].Expire = entry_list[i].expire;
                    entryList[i].Command = new string((sbyte *) entry_list[i].subj);
                }

                usched_result_free_show();
            }

            return entryList;
        }