예제 #1
0
파일: Compiler.cs 프로젝트: dkwkekzz/Test
        public void CompileParallel(IEnumerable <ActionSource> input, IInjectable <UnityComponentSource> output)
        {
            int count = -1;

            Parallel.ForEach(input, src =>
            {
                var builder = new StringBuilder(Config.MAX_KEY_LENGTH);

                for (int i = src.startOffset; i != src.count; i++)
                {
                    if (src.context[i] == ' ')
                    {
                        output.Push()
                    }
                    else
                    {
                        builder.Append(src.context[i]);
                    }
                }
            });
        }
예제 #2
0
        public void OnUpdate(IEnumerable <ActionSource> input, IInjectable <UnityComponentSource> output)
        {
            Parallel.ForEach(input, src =>
            {
                var builder = _builderPool.GetObject();

                string cmd;
                string arg;
                for (int i = src.startOffset; i != src.count; i++)
                {
                    if (src.context[i] == ' ')
                    {
                    }
                    else
                    {
                        builder.Append(src.context[i]);
                    }
                }

                output.Push();

                _builderPool.PutObject(builder);
            });
        }