Beispiel #1
0
        public void CopyFrom(IMatch srcMatch)
        {
            LJMatch srcImpl = srcMatch as LJMatch;

            if (srcImpl == null)
            {
                throw new ArgumentException("source Match has invalid type", "srcMatch");
            }
            this.success = srcImpl.success;
            this.index   = srcImpl.index;
            this.length  = srcImpl.length;
            srcImpl.groups.CopyTo(this.groups, 0);
        }
Beispiel #2
0
        LJMatch GetOfCreateOutMatchImpl(ref IMatch outMatch)
        {
            LJMatch matchImp;

            if (outMatch == null)
            {
                matchImp = new LJMatch(this);
                outMatch = matchImp;
            }
            else
            {
                matchImp = outMatch as LJMatch;
                if (matchImp == null)
                {
                    throw new ArgumentException("outMatch has invalid type");
                }
            }
            return(matchImp);
        }
Beispiel #3
0
        public IMatch CreateEmptyMatch()
        {
            var ret = new LJMatch(this);

            return(ret);
        }