3 changed files
WPE.App.Services | ||
IMqttService.cs | ||
WPE.App.Services.csproj | ||
ReadMe.md | ||
Add comment 1 Minus namespace Infsoft.WPE.App.Services
Add comment 2 Minus {
Add comment 3 Minus /// <summary>
Add comment 4 Minus /// Service to interact with the mqtt broker to receive realtime data
Add comment 5 Minus /// </summary>
Add comment 6 Minus /// <typeparam name="T">Any class of app assembly to resolve allowed topics</typeparam>
Add comment 7 Minus [System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S2326:Unused type parameters should be removed", Justification = "Used in implementation")]
Add comment 8 Minus public interface IMqttService<T>
Add comment 9 Minus {
Add comment 10 Minus /// <summary>
Add comment 11 Minus /// Subscribe to given topic
Add comment 12 Minus /// </summary>
Add comment 13 Minus /// <remarks>
Add comment 14 Minus /// Topic will be prefixed with either the general topic prefix or a user specific one (dependend on <paramref name="isUserSpecific"/>)
Add comment 15 Minus /// <para />
Add comment 16 Minus /// Do not use a inline callback, to be able to unregister it at a later time
Add comment 17 Minus /// </remarks>
Add comment 18 Minus /// <param name="topic">Subtopic to subscribe to</param>
Add comment 19 Minus /// <param name="callback">Function to invoke on message receive, will be called with json string</param>
Add comment 20 Minus /// <param name="isUserSpecific">Flag to indicate, if topic should be user specific</param>
Add comment 21 Minus Task SubscribeTopic(string topic, Func<string, Task> callback, bool isUserSpecific = true);
Add comment 22 Minus
Add comment 23 Minus /// <summary>
Add comment 24 Minus /// Unsubscribe from given topic
Add comment 25 Minus /// </summary>
Add comment 26 Minus /// <remarks>
Add comment 27 Minus /// Topic will be prefixed with either the general topic prefix or a user specific one (dependend on <paramref name="isUserSpecific"/>)
Add comment 28 Minus /// <para />
Add comment 29 Minus /// Do not use a inline callback, use the same function used to register the callback
Add comment 30 Minus /// </remarks>
Add comment 31 Minus /// <param name="topic">Subtopic to unsubscribe from</param>
Add comment 32 Minus /// <param name="callback">Function to invoke on message receive, will be called with json string</param>
Add comment 33 Minus /// <param name="isUserSpecific">Flag to indicate, if topic should be user specific</param>
Add comment 34 Minus Task UnsubscribeTopic(string topic, Func<string, Task> callback, bool isUserSpecific = true);
Add comment 35 Minus
Add comment 36 Minus /// <summary>
Add comment 37 Minus /// Publish to given topic, <paramref name="data"/> will be serialized to json
Add comment 38 Minus /// </summary>
Add comment 39 Minus /// <remarks>Topic will be prefixed with either the general topic prefix or a user specific one (dependend on <paramref name="isUserSpecific"/>)</remarks>
Add comment 40 Minus /// <typeparam name="TIn">Class to serialize data by</typeparam>
Add comment 41 Minus /// <param name="topic">Subtopic to subscribe to</param>
Add comment 42 Minus /// <param name="data">Data to publish</param>
Add comment 43 Minus /// <param name="isUserSpecific">Flag to indicate, if topic should be user specific</param>
Add comment 44 Minus Task PublishMessage<TIn>(string topic, TIn data, bool isUserSpecific = true) where TIn : class;
Add comment 45 Minus }
Add comment 46 Minus }
Add comment 47 Minus
WPE.App.Services.csproj
/WPE.App.Services/WPE.App.Services.csproj-1+1/WPE.App.Services/WPE.App.Services.csproj
Add comment 16 <PackageIcon>icon.png</PackageIcon>
Add comment 17 <PackageReadmeFile>ReadMe.md</PackageReadmeFile>
Add comment 18 <PackageTags>WPE;Workplace Experience;infsoft</PackageTags>
Add comment 19 Minus <Version>0.8.2</Version>
Add comment 19 Plus <Version>0.8.3</Version>
Add comment 20 <GenerateDocumentationFile>true</GenerateDocumentationFile>
Add comment 21 </PropertyGroup>
Add comment 22
Add comment 3
Add comment 4 ## Services
Add comment 5 - **[IRequestCache](WPE.App.Services/IRequestCache.cs)** Provides an interface for the delegating handler [CachingHandler](WPE.App.Services/HttpHandlers/CachingHandler.cs) to cache requests.
Add comment 6 Minus - **[IMqttService](WPE.App.Services/IMqttService.cs)** Provides access to realtime data transfer via Mqtt.
Add comment 7 6 - **[ISettingsService](WPE.App.Services/ISettingsService.cs)** Provides access to settings synced across platforms.
Add comment 8 7 - **[ISettingsProvider](WPE.App.Services/ISettingsProvider.cs)** Provides access to global app settings like language.
Add comment 9 8 - **[INavBarChildContent](WPE.App.Services/INavBarChildContent.cs)** Provides the possibility to set a renderFragemnt as child content in the minimal navBar.