Home Ask Login Register

Developers Planet

Your answer is one click away!

Greg Brattle February 2016

how to generically log enumerable context data in azure apim?

Do you have a way to generically log enumerable context data in Azure APIM? For example, a policy that includes context.Api.Protocols returns:

  context.Api.Protocols: System.Collections.Immutable.ImmutableArray`1[

However, I want the policy to return a list of the actual protocols instead of just the type. Are there generic code statements or expressions I can include in the policy to do this?


Vitaliy Kurokhtin February 2016

There is nothing built-in that I can think of, so probably your best bet is just a string.Join call:

string.Join(", ", context.Protocols)

Post Status

Asked in February 2016
Viewed 1,719 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life