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[
    System.String
  ]

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?

Answers


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

Search




Leave an answer