mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-04-05 17:39:39 -04:00
Added HttpClient to Core interface.
This commit is contained in:
parent
60ae74e347
commit
9e9659f71b
@ -3,7 +3,6 @@ using Observatory.Framework.Files;
|
|||||||
using Observatory.Framework.Interfaces;
|
using Observatory.Framework.Interfaces;
|
||||||
using Observatory.NativeNotification;
|
using Observatory.NativeNotification;
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Observatory.PluginManagement
|
namespace Observatory.PluginManagement
|
||||||
{
|
{
|
||||||
@ -111,6 +110,11 @@ namespace Observatory.PluginManagement
|
|||||||
Avalonia.Threading.Dispatcher.UIThread.InvokeAsync(action);
|
Avalonia.Threading.Dispatcher.UIThread.InvokeAsync(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public System.Net.Http.HttpClient HttpClient
|
||||||
|
{
|
||||||
|
get => Observatory.HttpClient.Client;
|
||||||
|
}
|
||||||
|
|
||||||
public event EventHandler<NotificationArgs> Notification;
|
public event EventHandler<NotificationArgs> Notification;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
using Observatory.Framework.Files;
|
using Observatory.Framework.Files;
|
||||||
using Observatory.Framework.Files.Journal;
|
using Observatory.Framework.Files.Journal;
|
||||||
|
|
||||||
@ -169,5 +170,10 @@ namespace Observatory.Framework.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="action"></param>
|
/// <param name="action"></param>
|
||||||
public void ExecuteOnUIThread(Action action);
|
public void ExecuteOnUIThread(Action action);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shared application HttpClient object. Provided so that plugins can adhere to .NET recommended behaviour of a single HttpClient object per application.
|
||||||
|
/// </summary>
|
||||||
|
public HttpClient HttpClient { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user