skip to Main Content

Rewrite dispose of Azure Service bus

I have a class called ServiceBusBackgroundJobManager, it sends messages to Azure service bus public class ServiceBusBackgroundJobManager : BackgroundWorkerBase, IBackgroundJobManager { private readonly IAppConfigurationAccessor _configurationAccessor; private readonly ServiceBusClient _client; private ServiceBusSender _sender; private readonly string _serviceBusQueueName; public ServiceBusBackgroundJobManager(IAppConfigurationAccessor configurationAccessor) { _configurationAccessor…

VIEW QUESTION

How to get the property's name of an object using jQuery?

this is my form: <form id="inventoryForm" action="/ManderalMatrix/AddManderalInventory" class="reactiveToButton"> <div class="row" style="margin-top: 18px"> <div class="col-md-3"> <div class="form-group"> <label> Size of punch (mm) <span style="color:red">*</span> </label> <input name="PunchSize" id="PunchSize" type="text" class="form-control inventoryInput objectInput" /> </div> </div> <div class="col-md-3"> <div class="form-group"> <label> Shape…

VIEW QUESTION

How to set a JsonSerializerOptions globally for my httpClient.GetFromJsonAsync<T> calls

In my ASP.NET web API I have httpClient which call GetFromJsonAsync: var jsonSerializerOptions = new JsonSerializerOptions { PropertyNameCaseInsensitive = true, }; jsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()); await httpClient.GetFromJsonAsync<Item[]>(uri, jsonSerializerOptions); It is quite repetitive to add the jsonSerializerOptions parameter in all my GetFromJsonAsync calls…

VIEW QUESTION
Back To Top
Search