示例#1
0
        public static AssetReferences a(
            AssetUpdate data, int workers, Ref <float> progress, ILog log
            )
        {
            var refs = new AssetReferences();

            process(
                data, workers,
                pathToGuid: refs.pathToGuid, parents: refs.parents, children: refs.children,
                progress: progress, log: log
                );
            return(refs);
        }
示例#2
0
        static void process(AssetUpdate data, ILog log)
        {
            try {
                processing   = true;
                needsRepaint = true;

                refsOpt.voidFold(
                    () => refsOpt = AssetReferences.a(data, Environment.ProcessorCount, progress, log).some(),
                    refs => refs.update(data, Environment.ProcessorCount, progress, log)
                    );
            }
            finally {
                processing = false;
            }
        }