コード例 #1
0
        public static Comparison <KeyValuePair <int, T> > ComparisonForJobType(ProcessingJobType type)
        {
            switch (type)
            {
            case ProcessingJobType.ElevationSorting:
                return(Elevation);
            }

            return(null);
        }
        public List <KeyValuePair <int, T> > Register(ProcessingJobType jobType)
        {
            TrackableProcessingJob <T> tempJob;

            if (TryGetValue(jobType, out tempJob))
            {
                tempJob.userCount++;
                return(tempJob.processed);
            }

            var list       = new List <KeyValuePair <int, T> >();
            var comparison = TrackableComparisons <T> .ComparisonForJobType(jobType);

            Add(jobType, new TrackableProcessingJob <T>(m_Source, list, comparison));
            return(list);
        }
        public int Unregister(ProcessingJobType jobType)
        {
            TrackableProcessingJob <T> tempJob;

            if (TryGetValue(jobType, out tempJob))
            {
                tempJob.userCount--;
                if (tempJob.userCount <= 0)
                {
                    Remove(jobType);
                }

                return(tempJob.userCount);
            }

            return(-1);
        }
コード例 #4
0
 public static int UnregisterProcessingJob <T>(this IUsesMARSTrackableData <T> obj, ProcessingJobType jobType)
     where T : IMRTrackable
 {
     return(IUsesMARSTrackableDataMethods <T> .UnregisterProcessingJob(jobType));
 }
コード例 #5
0
 public static List <KeyValuePair <int, T> > RegisterProcessingJob <T>(this IUsesMARSTrackableData <T> obj, ProcessingJobType jobType)
     where T : IMRTrackable
 {
     return(IUsesMARSTrackableDataMethods <T> .RegisterProcessingJob(jobType));
 }
 static int UnregisterProcessingJobNoop(ProcessingJobType jobType)
 {
     return(0);
 }
 public int UnregisterProcessingJob(ProcessingJobType jobType)
 {
     return(m_Jobs.Unregister(jobType));
 }
 public List <KeyValuePair <int, T> > RegisterProcessingJob(ProcessingJobType jobType)
 {
     return(m_Jobs.Register(jobType));
 }