Smdn.TPSmartHomeDevices.Primitives 1.0.0-rc1

Prefix Reserved
This is a prerelease version of Smdn.TPSmartHomeDevices.Primitives.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Smdn.TPSmartHomeDevices.Primitives --version 1.0.0-rc1                
NuGet\Install-Package Smdn.TPSmartHomeDevices.Primitives -Version 1.0.0-rc1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Smdn.TPSmartHomeDevices.Primitives" Version="1.0.0-rc1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Smdn.TPSmartHomeDevices.Primitives --version 1.0.0-rc1                
#r "nuget: Smdn.TPSmartHomeDevices.Primitives, 1.0.0-rc1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Smdn.TPSmartHomeDevices.Primitives as a Cake Addin
#addin nuget:?package=Smdn.TPSmartHomeDevices.Primitives&version=1.0.0-rc1&prerelease

// Install Smdn.TPSmartHomeDevices.Primitives as a Cake Tool
#tool nuget:?package=Smdn.TPSmartHomeDevices.Primitives&version=1.0.0-rc1&prerelease                

Smdn.TPSmartHomeDevices.Primitives-1.0.0-rc1

Provides common types for Smdn.TPSmartHomeDevices.Kasa and Smdn.TPSmartHomeDevices.Tapo, including abstraction interfaces, extension methods and custom JsonConverter's. This library does not provide any specific implementations to operate Kasa and Tapo devices.

API List

List of APIs exposed by assembly Smdn.TPSmartHomeDevices.Primitives-1.0.0-rc1 (net6.0)

// Smdn.TPSmartHomeDevices.Primitives.dll (Smdn.TPSmartHomeDevices.Primitives-1.0.0-rc1)
//   Name: Smdn.TPSmartHomeDevices.Primitives
//   AssemblyVersion: 1.0.0.0
//   InformationalVersion: 1.0.0-rc1+7ce7d5ecfff9471ef9ebdce241166784cce4cbbd
//   TargetFramework: .NETCoreApp,Version=v6.0
//   Configuration: Release
//   Referenced assemblies:
//     Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
//     System.Net.NetworkInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
//     System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
//     System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
//     System.Text.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations

using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Smdn.TPSmartHomeDevices;
using Smdn.TPSmartHomeDevices.Json;

namespace Smdn.TPSmartHomeDevices {
  public interface IDeviceEndPoint {
    ValueTask<EndPoint?> ResolveAsync(CancellationToken cancellationToken = default);
  }

  public interface IDeviceEndPointFactory<TAddress> where TAddress : notnull {
    IDeviceEndPoint Create(TAddress address);
  }

  public interface IDynamicDeviceEndPoint : IDeviceEndPoint {
    void Invalidate();
  }

  public static class DeviceEndPoint {
    public static IDeviceEndPoint Create(EndPoint endPoint) {}
    public static IDeviceEndPoint Create(IPAddress ipAddress) {}
    public static IDeviceEndPoint Create(string host) {}
    public static IDeviceEndPoint Create<TAddress>(TAddress address, IDeviceEndPointFactory<TAddress> endPointFactory) where TAddress : notnull {}
  }

  public static class DeviceEndPointFactoryServiceCollectionExtensions {
    public static IServiceCollection AddDeviceEndPointFactory<TAddress>(this IServiceCollection services, IDeviceEndPointFactory<TAddress> endPointFactory) where TAddress : notnull {}
  }

  public class DeviceEndPointResolutionException : Exception {
    public DeviceEndPointResolutionException(IDeviceEndPoint deviceEndPoint) {}
    public DeviceEndPointResolutionException(IDeviceEndPoint deviceEndPoint, string message, Exception? innerException) {}

    public IDeviceEndPoint DeviceEndPoint { get; }
  }

  public static class IDeviceEndPointExtensions {
    public static ValueTask<EndPoint> ResolveOrThrowAsync(this IDeviceEndPoint deviceEndPoint, int defaultPort, CancellationToken cancellationToken = default) {}
  }

  public sealed class StaticDeviceEndPoint : IDeviceEndPoint {
    public StaticDeviceEndPoint(EndPoint endPoint) {}

    public ValueTask<EndPoint?> ResolveAsync(CancellationToken cancellationToken = default) {}
    public override string? ToString() {}
  }
}

namespace Smdn.TPSmartHomeDevices.Json {
  public sealed class GeolocationInDecimalDegreesJsonConverter : JsonConverter<decimal?> {
    public GeolocationInDecimalDegreesJsonConverter() {}

    public override decimal? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {}
    public override void Write(Utf8JsonWriter writer, decimal? @value, JsonSerializerOptions options) {}
  }

  public sealed class MacAddressJsonConverter : JsonConverter<PhysicalAddress> {
    public MacAddressJsonConverter() {}

    public override PhysicalAddress? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {}
    public override void Write(Utf8JsonWriter writer, PhysicalAddress @value, JsonSerializerOptions options) {}
  }

  public sealed class TimeSpanInMinutesJsonConverter : TimeSpanJsonConverter {
    public TimeSpanInMinutesJsonConverter() {}

    protected override TimeSpan ToTimeSpan(int @value) {}
  }

  public sealed class TimeSpanInSecondsJsonConverter : TimeSpanJsonConverter {
    public TimeSpanInSecondsJsonConverter() {}

    protected override TimeSpan ToTimeSpan(int @value) {}
  }

  public abstract class TimeSpanJsonConverter : JsonConverter<TimeSpan?> {
    protected TimeSpanJsonConverter() {}

    public override TimeSpan? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {}
    protected abstract TimeSpan ToTimeSpan(int @value);
    public override void Write(Utf8JsonWriter writer, TimeSpan? @value, JsonSerializerOptions options) {}
  }
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.2.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Smdn.TPSmartHomeDevices.Primitives:

Package Downloads
Smdn.TPSmartHomeDevices.Tapo

Provides APIs for operating Tapo devices, the TP-Link smart home devices.

Smdn.TPSmartHomeDevices.Kasa

Provides APIs for operating Kasa devices, the TP-Link smart home devices.

Smdn.TPSmartHomeDevices.MacAddressEndPoint

An extension library to add a service to Smdn.TPSmartHomeDevices.Tapo and Smdn.TPSmartHomeDevices.Kasa that enables the resolution of devices' endpoints by MAC address.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 108 10/9/2024
1.1.0 675 1/23/2024
1.1.0-preview3 167 1/18/2024
1.1.0-preview2 179 1/16/2024
1.1.0-preview1 212 1/8/2024
1.0.1 202 5/2/2023
1.0.0 870 5/2/2023
1.0.0-rc1 415 4/27/2023