GetSharedStringBuilder() приватный Метод

private GetSharedStringBuilder ( ) : StringBuilder
Результат StringBuilder
Пример #1
0
        internal string Evaluate(Processor processor, ActionFrame frame) {
            if (IsConstant) {
                Debug.Assert(constAvt != null);
                return constAvt;
            }
            else {
                Debug.Assert(processor != null && frame != null);

                StringBuilder builder = processor.GetSharedStringBuilder();

                for(int i = 0; i < events.Length; i ++) {
                    builder.Append(events[i].Evaluate(processor, frame));
                }
                processor.ReleaseSharedStringBuilder();
                return builder.ToString();
            }
        }
Пример #2
0
        internal string Evaluate(Processor processor, ActionFrame frame)
        {
            if (IsConstant)
            {
                Debug.Assert(constAvt != null);
                return(constAvt);
            }
            else
            {
                Debug.Assert(processor != null && frame != null);

                StringBuilder builder = processor.GetSharedStringBuilder();

                for (int i = 0; i < events.Length; i++)
                {
                    builder.Append(events[i].Evaluate(processor, frame));
                }
                processor.ReleaseSharedStringBuilder();
                return(builder.ToString());
            }
        }