/// <summary> /// Create a filter for <see cref="Akka.Event.Info"/> events. Events must match the specified pattern to be filtered. /// <example> /// Info(pattern: new Regex("weird.*message"), source: obj) // filter on pattern and source /// </example> /// <remarks>Please note that filtering on the <paramref name="source"/> being /// <c>null</c> does NOT work (passing <c>null</c> disables the source filter). /// </remarks> /// </summary> /// <param name="pattern">The event must match the pattern to be filtered.</param> /// <param name="source">>Optional. The event source.</param> /// <returns>The new filter</returns> public IEventFilterApplier Info(Regex pattern, string source = null) { var sourceMatcher = source == null ? null : new EqualsStringAndPathMatcher(source); var filter = new InfoFilter(new RegexMatcher(pattern), sourceMatcher); return(CreateApplier(filter, _system)); }
// --- Info ------------------------------------------------------------------------------------------------ /// <summary> /// Create a filter for <see cref="Akka.Event.Info"/> events. /// <para><paramref name="message" /> takes priority over <paramref name="start" />. /// If <paramref name="message" />!=<c>null</c> the event must match it to be filtered. /// If <paramref name="start" />!=<c>null</c> and <paramref name="message" /> has not been specified, /// the event must start with the given string to be filtered. /// If <paramref name="contains" />!=<c>null</c> and both <paramref name="message" /> and /// <paramref name="start" /> have not been specified, /// the event must contain the given string to be filtered. /// </para><example> /// Info() // filter all Info events /// Info("message") // filter on exactly matching message /// Info(source: obj) // filter on event source /// Info(start: "Expected") // filter on start of message /// Info(contains: "Expected") // filter on part of message /// </example> /// <remarks>Please note that filtering on the <paramref name="source"/> being /// <c>null</c> does NOT work (passing <c>null</c> disables the source filter). /// </remarks> /// </summary> /// <param name="message">Optional. If specified the event must match it exactly to be filtered.</param> /// <param name="start">Optional. If specified (and <paramref name="message"/> is not specified), the event must start with the string to be filtered.</param> /// <param name="contains">Optional. If specified (and neither <paramref name="message"/> nor <paramref name="start"/> are specified), the event must contain the string to be filtered.</param> /// <param name="source">Optional. The event source.</param> /// <returns>The new filter</returns> public IEventFilterApplier Info(string message = null, string start = null, string contains = null, string source = null) { var messageMatcher = CreateMessageMatcher(message, start, contains); //This file has been auto generated. Do NOT modify this file directly var sourceMatcher = source == null ? null : new EqualsStringAndPathMatcher(source); var filter = new InfoFilter(messageMatcher, sourceMatcher); return(CreateApplier(filter, _system)); }