read blob data

private async Task<string> GetBlobMessage(string deviceType, ReplayMessage replayMessage, string connectionString, Models.Platform platformDetails) { string userName = HttpContext.User.Identity.Name; Microsoft.Azure.Devices.Device device; registryManager = RegistryManager.CreateFromConnectionString(connectionString); string year = replayMessage.Year.ToString(); string date = String.Format(“{0:D2}”, replayMessage.Date); string month = String.Format(“{0:D2}”, replayMessage.Month); string hour = String.Format(“{0:D2}”, replayMessage.Hour); telemetry.TrackEvent(“BlobMessage started “); //string time = month + “/” + date + “/” + year… Read More read blob data

Signal R with .NET

public class NotificationSend : Hub { private static IHubContext hubContext = GlobalHost.ConnectionManager.GetHubContext<NotificationSend>(); public override Task OnConnected() { string name = Context.User.Identity.Name; Groups.Add(Context.ConnectionId, name); return base.OnConnected(); } public void SendToUser(string messageText,string userName) { hubContext.Clients.Group(userName).Notification(messageText); } public void StopLoader(string messageText, string userName) { hubContext.Clients.Group(userName).Stoploader(messageText); } } $(function () { var notification = $.connection.notificationSend; console.log(notification); notification.client.Notification = function… Read More Signal R with .NET

Rest Client example execute api POST and DELETE oauth url generate token

public class HttpClientHelper { private static HttpClient httpClient = new HttpClient(); private static RestClient client = new RestClient(“https://login.microsoftonline.com/c1eb5112-7946-4c9d-bc57-40040cfe3a91/&#8221;); public static AuthenticationResultData GenerateToken(string clientId, string clientSecret, string resourceId) { string accessToken = string.Empty; AuthenticationResultData result = new AuthenticationResultData(); try { //var client = new RestClient(“https://login.microsoftonline.com/{tenant-id}/”); var request = new RestRequest(“oauth2/token”, Method.POST); request.AddHeader(“Content-Type”, “application/x-www-form-urlencoded”); request.AddParameter(“grant_type”, “client_credentials”); request.AddParameter(“resource”,… Read More Rest Client example execute api POST and DELETE oauth url generate token