Skip to content

Commit

Permalink
Fix missing xml comments (#913)
Browse files Browse the repository at this point in the history
Co-authored-by: Tomas Hellström <[email protected]>
  • Loading branch information
FrankBakkerNl and helto4real authored Aug 20, 2023
1 parent 5ff1741 commit 9db4b38
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// ReSharper disable UnusedType.Global

#pragma warning disable 1591
#pragma warning disable CS1574, CS1584, CS1581, CS1580
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class DynamicallyCompiledAppAssemblyProvider : IAppAssemblyProvider, ID
private readonly ICompiler _compiler;

private Assembly? _compiledAssembly;
private CollectibleAssemblyLoadContext? _currentContext;
private CollectableAssemblyLoadContext? _currentContext;

public DynamicallyCompiledAppAssemblyProvider(ICompiler compiler)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace NetDaemon.AppModel.Internal.Compiler;

public class CollectibleAssemblyLoadContext : AssemblyLoadContext
internal class CollectableAssemblyLoadContext : AssemblyLoadContext
{
public CollectibleAssemblyLoadContext() : base(true)
public CollectableAssemblyLoadContext() : base(true)
{
}

Expand Down
5 changes: 2 additions & 3 deletions src/AppModel/NetDaemon.AppModel/Internal/Compiler/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime;
using System.Runtime.Loader;
using System.Text.RegularExpressions;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand All @@ -13,7 +12,7 @@

namespace NetDaemon.AppModel.Internal.Compiler;

internal record CompiledAssemblyResult(CollectibleAssemblyLoadContext AssemblyContext, Assembly CompiledAssembly);
internal record CompiledAssemblyResult(CollectableAssemblyLoadContext AssemblyContext, Assembly CompiledAssembly);

internal class Compiler : ICompiler
{
Expand All @@ -33,7 +32,7 @@ public Compiler(

public CompiledAssemblyResult Compile()
{
CollectibleAssemblyLoadContext context = new();
CollectableAssemblyLoadContext context = new();

var compilation = GetSharpCompilation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace NetDaemon.AppModel.Internal.Config;

public class YamlConfigurationSource : FileConfigurationSource
internal class YamlConfigurationSource : FileConfigurationSource
{
public override IConfigurationProvider Build(IConfigurationBuilder builder)
{
Expand Down
18 changes: 4 additions & 14 deletions src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,18 @@
<Version>21.47.1</Version>
<Authors>helto4real</Authors>
<Company>JoySoftware</Company>
<description>A .net core client for Home Assistant</description>
<projectUrl>https://github.com/helto4real/net-hassclient</projectUrl>
<description>Application model for NetDaemon</description>
<projectUrl>https://github.com/net-daemon/netdaemon</projectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageDescription>
A client for manage the free open source home automations software Home Assisstant written in .net core 3.
Please see https://github.com/helto4real/net-hassclient/blob/main/README.md for docs.
Provides NetDaemons application model
Please see https://github.com/net-daemon/netdaemon.
</PackageDescription>
<PackageReleaseNotes>First alpha version, expect things to change!</PackageReleaseNotes>
<tags>Home Assistant</tags>
<RootNamespace>NetDaemon.AppModel</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702</NoWarn>
<!-- add these to also hide the warnings during development ;CS1591;CS1573 -->
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;CS1591;CS1574</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
Expand Down
13 changes: 6 additions & 7 deletions src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@
<Version>21.47.1</Version>
<Authors>helto4real</Authors>
<Company>JoySoftware</Company>
<description>A .net core client for Home Assistant</description>
<projectUrl>https://github.com/helto4real/net-hassclient</projectUrl>
<description>A .Net client for Home Assistant</description>
<projectUrl>https://github.com/net-daemon/netdaemon</projectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageDescription>
A client for manage the free open source home automations software Home Assisstant written in .net core 3.
A client for manage the free open source home automations software Home Assisstant written in .Net.
Please see https://github.com/helto4real/net-hassclient/blob/main/README.md for docs.
</PackageDescription>
<PackageReleaseNotes>First alpha version, expect things to change!</PackageReleaseNotes>
<PackageReleaseNotes>This package is used internally by NetDaemon and not intended to be used directly. That means things could change if needed without prior notice</PackageReleaseNotes>
<tags>Home Assistant</tags>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702</NoWarn>
<!-- add these to also hide the warnings during development ;CS1591;CS1573 -->
<NoWarn>1701;1702;IL2121;CS1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;CS1591</NoWarn>
<NoWarn>1701;1702;IL2121;CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

namespace NetDaemon.Runtime;

/// <summary>
/// NetDaemon.Runtime Extension methods for IHostBuilder
/// </summary>
public static class HostBuilderExtensions
{
/// <summary>
/// Call this method to load NetDeamonYaml settings, and to register 'ConfigureNetDaemonServices' in the service collection
/// Call this method to load NetDeamon Yaml settings, and to register 'ConfigureNetDaemonServices' in the service collection
/// </summary>
/// <param name="hostBuilder"></param>
/// <remarks>
Expand Down Expand Up @@ -56,6 +59,9 @@ public static IHostBuilder RegisterYamlSettings(this IHostBuilder hostBuilder)
});
}

/// <summary>
/// Adds the NetDaemon Runtime Services to a HostBuilder
/// </summary>
public static IHostBuilder UseNetDaemonRuntime(this IHostBuilder hostBuilder)
{
return hostBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@

namespace NetDaemon.Runtime;

/// <summary>
/// NetDaemon.Runtime Extension methods for IServiceCollection
/// </summary>
public static class ServiceBuilderExtensions
{
/// <summary>
/// COnfigures required sercvies to use the NetDaemon Application State manager
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <returns>The <see cref="IServiceCollection"/> so that additional calls can be chained.</returns>
public static IServiceCollection AddNetDaemonStateManager(this IServiceCollection services)
{
services.AddSingleton<AppStateManager>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
using NetDaemon.AppModel;

namespace NetDaemon.Runtime;

/// <summary>
/// NetDaemon.Runtime Extension methods for IServiceCollection
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// Loads NetDaemon and HomeAssistant configuration sections
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <param name="config">The current <see cref="IConfiguration" /> instance</param>
/// <returns>The <see cref="IServiceCollection"/> so that additional calls can be chained.</returns>
public static IServiceCollection ConfigureNetDaemonServices(this IServiceCollection services, IConfiguration config)
{
return services.Configure<AppConfigurationLocationSetting>(config.GetSection("NetDaemon"))
Expand Down
2 changes: 1 addition & 1 deletion src/Runtime/NetDaemon.Runtime/Common/IRuntime.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace NetDaemon.Runtime;

public interface IRuntime : IAsyncDisposable
internal interface IRuntime : IAsyncDisposable
{
Task StartAsync(CancellationToken stoppingToken);
}
9 changes: 4 additions & 5 deletions src/Runtime/NetDaemon.Runtime/NetDaemon.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
<Version>21.47.1</Version>
<Authors>helto4real</Authors>
<Company>JoySoftware</Company>
<description>A .net core client for Home Assistant</description>
<projectUrl>https://github.com/helto4real/net-hassclient</projectUrl>
<description>Runtime</description>
<projectUrl>https://github.com/net-daemon/netdaemon</projectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageDescription>
A client for manage the free open source home automations software Home Assisstant written in .net core 3.
Please see https://github.com/helto4real/net-hassclient/blob/main/README.md for docs.
Runtime package for NetDeamon
Please see https://netdaemon.xyz for docs.
</PackageDescription>
<PackageReleaseNotes>First alpha version, expect things to change!</PackageReleaseNotes>
<tags>Home Assistant</tags>
<RootNamespace>NetDaemon.Runtime</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
Expand Down

0 comments on commit 9db4b38

Please sign in to comment.