Skip to content

Commit c1e5bea

Browse files
committed
README update
1 parent 2972dbb commit c1e5bea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,26 +264,26 @@ For example:
264264
```csharp
265265
public static class MyFunctions
266266
{
267-
public static LogEventPropertyValue? IsFoo(
267+
public static LogEventPropertyValue? IsHello(
268268
StringComparison comparison,
269-
LogEventPropertyValue? maybeFoo)
269+
LogEventPropertyValue? maybeHello)
270270
{
271-
if (maybeFoo is ScalarValue sv && sv.Value is string s)
272-
return new ScalarValue(s.Equals("Foo", comparison));
271+
if (maybeHello is ScalarValue sv && sv.Value is string s)
272+
return new ScalarValue(s.Equals("Hello", comparison));
273273

274274
// Undefined - argument was not a string.
275275
return null;
276276
}
277277
}
278278
```
279279

280-
In the example, `IsFoo('Foo')` will evaluate to `true`, `IsFoo('FOO')` will be `false`, `IsFoo('FOO') ci`
281-
will be `true`, and `IsFoo(42)` will be undefined.
280+
In the example, `IsHello('Hello')` will evaluate to `true`, `IsHello('HELLO')` will be `false`, `IsHello('HELLO') ci`
281+
will be `true`, and `IsHello(42)` will be undefined.
282282

283283
User-defined functions are supplied through an instance of `NameResolver`:
284284

285285
```csharp
286286
var myFunctions = new StaticMemberNameResolver(typeof(MyFunctions));
287-
var expr = SerilogExpression.Compile("IsFoo(User.Name)", new[] { myFunctions });
287+
var expr = SerilogExpression.Compile("IsHello(User.Name)", new[] { myFunctions });
288288
// Filter events based on whether `User.Name` is `'Foo'` :-)
289289
```

0 commit comments

Comments
 (0)