public static void AddFilter(AssertFilter filter) { if (iFilterArraySize <= iNumOfFilters) { AssertFilter[] destinationArray = new AssertFilter[iFilterArraySize + 2]; if (iNumOfFilters > 0) { Array.Copy(ListOfFilters, destinationArray, iNumOfFilters); } iFilterArraySize += 2; ListOfFilters = destinationArray; } ListOfFilters[iNumOfFilters++] = filter; }
// AddFilter adds a new assert filter. This replaces the current // filter, unless the filter returns FailContinue. // internal static void AddFilter(AssertFilter filter) { if (iFilterArraySize <= iNumOfFilters) { AssertFilter[] newFilterArray = new AssertFilter[iFilterArraySize+2]; if (iNumOfFilters > 0) Array.Copy(ListOfFilters, newFilterArray, iNumOfFilters); iFilterArraySize += 2; ListOfFilters = newFilterArray; } ListOfFilters [iNumOfFilters++] = filter; }
static Assert() { Filter = new DefaultFilter(); }