Esempio n. 1
0
        public static void AtIndecies(this string e, string target, AtIndeciesDelegate h)
        {
            // X:\jsc.svn\examples\javascript\Test\Test453AtIndeciesWhile\Test453AtIndeciesWhile\Class1.cs
            // X:\jsc.svn\examples\javascript\css\Test\TestLongWebMethod\TestLongWebMethod\ApplicationWebService.cs

            var i          = e.IndexOf(target);
            var YieldIndex = -1;

            while (i >= 0)
            {
                YieldIndex++;

                Action YieldBreak = () => i = -1;

                h(
                    new AtIndeciesArguments
                {
                    e          = e,
                    i          = i,
                    target     = target,
                    YieldIndex = YieldIndex,
                    YieldBreak = YieldBreak
                }
                    );


                if (i >= 0)
                {
                    i = e.IndexOf(target, i + target.Length);
                }
            }
        }
Esempio n. 2
0
        public static void AtIndecies(this string e, string target, AtIndeciesDelegate h)
        {
            // X:\jsc.svn\examples\javascript\Test\Test453AtIndeciesWhile\Test453AtIndeciesWhile\Class1.cs
            // X:\jsc.svn\examples\javascript\css\Test\TestLongWebMethod\TestLongWebMethod\ApplicationWebService.cs

            var i = e.IndexOf(target);
            var YieldIndex = -1;
            while (i >= 0)
            {
                YieldIndex++;

                Action YieldBreak = () => i = -1;

                h(
                    new AtIndeciesArguments
                    {
                        e = e,
                        i = i,
                        target = target,
                        YieldIndex = YieldIndex,
                        YieldBreak = YieldBreak
                    }
                );


                if (i >= 0)
                    i = e.IndexOf(target, i + target.Length);
            }
        }