Esempio n. 1
0
 public BeginEndMarkReceiveFilter(byte[] beginMark, byte[] endMark)
 {
     m_BeginSearchState = new SearchMarkState <byte>(beginMark);
     m_EndSearchState   = new SearchMarkState <byte>(endMark);
 }
 protected CountSpliterReceiveFilter(byte[] spliter, int spliterCount)
 {
     m_SpliterSearchState = new SearchMarkState <byte>(spliter);
     m_SpliterCount       = spliterCount;
 }
        // Token: 0x06000794 RID: 1940 RVA: 0x0001C088 File Offset: 0x0001A288
        public static int SearchMark <T>(this IList <T> source, int offset, int length, SearchMarkState <T> searchState, out int parsedLength) where T : IEquatable <T>
        {
            int?num = source.SearchMark(offset, length, searchState.Mark, searchState.Matched, out parsedLength);

            if (num == null)
            {
                searchState.Matched = 0;
                return(-1);
            }
            if (num.Value < 0)
            {
                searchState.Matched = 0 - num.Value;
                return(-1);
            }
            searchState.Matched = 0;
            return(num.Value);
        }
 protected TerminatorReceiveFilter(byte[] terminator)
 {
     m_SearchState = new SearchMarkState <byte>(terminator);
 }