/// <summary> /// Retrieves the media services related configuration settings /// </summary> /// <param name="context">The function execution context</param> /// <returns>An instance of <see cref="MediaServiceOptions"/> representing the current configuration</returns> public static MediaServiceOptions GetMediaServiceConfiguration(this ExecutionContext context) { if (options == null) { var config = new ConfigurationBuilder() .SetBasePath(context.FunctionAppDirectory) .AddJsonFile("local.settings.json", optional: true, reloadOnChange: true) .AddEnvironmentVariables() .Build(); options = config.GetSection(SectionName) .Get <MediaServiceOptions>(); } return(options); }
/// <summary> /// Initializes a new instance of the <see cref="MediaServiceClient"/> class. /// </summary> /// <param name="options">The configuration options.</param> /// <param name="log">The log.</param> /// <param name="client">An instance of an existing <see cref="IAzureMediaServicesClient"/>.</param> public MediaServiceClient(MediaServiceOptions options, ILogger log, IAzureMediaServicesClient client) { this.Options = options; this.Log = log; this.Client = client; }
/// <summary> /// Initializes a new instance of the <see cref="MediaServiceClient"/> class. /// </summary> /// <param name="options">The configuration options.</param> /// <param name="log">The log.</param> public MediaServiceClient(MediaServiceOptions options, ILogger log) { this.Options = options; this.Log = log; }