Skip to content

Commit a006950

Browse files
Update articles/stream-analytics/stream-analytics-edge-csharp-udf-methods.md
Co-authored-by: Mary McCready <[email protected]>
1 parent 1ee1fe4 commit a006950

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/stream-analytics/stream-analytics-edge-csharp-udf-methods.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ The `StreamingContext` class lets you publish diagnostic information using the `
156156
`StreamingContext` is passed as an input parameter to the UDF method and can be used within the UDF to publish custom log information. In the example below, `MyUdfMethod` defines a **data** input, which is provided by the query, and a **context** input as the `StreamingContext`, provided by the runtime engine.
157157

158158
```csharp
159-
public static long MyUdfMethod(long data, StreamingContext context)
160-
{
161-
// write log
162-
context.Diagnostics.WriteError("User Log", "This is a log message");
163-
164-
return data;
165-
}
159+
public static long MyUdfMethod(long data, StreamingContext context)
160+
{
161+
// write log
162+
context.Diagnostics.WriteError("User Log", "This is a log message");
163+
164+
return data;
165+
}
166166
```
167167

168168
The `StreamingContext` value doesn't need to be passed in by the SQL query. Azure Stream Analytics provides a context object automatically if an input parameter is present. The use of the `MyUdfMethod` does not change as shown in the query below.

0 commit comments

Comments
 (0)