BlazorInteropGenerator.SourceGenerator 1.0.0-alpha.8

This is a prerelease version of BlazorInteropGenerator.SourceGenerator.
dotnet add package BlazorInteropGenerator.SourceGenerator --version 1.0.0-alpha.8
NuGet\Install-Package BlazorInteropGenerator.SourceGenerator -Version 1.0.0-alpha.8
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="BlazorInteropGenerator.SourceGenerator" Version="1.0.0-alpha.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorInteropGenerator.SourceGenerator --version 1.0.0-alpha.8
#r "nuget: BlazorInteropGenerator.SourceGenerator, 1.0.0-alpha.8"
#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 BlazorInteropGenerator.SourceGenerator as a Cake Addin
#addin nuget:?package=BlazorInteropGenerator.SourceGenerator&version=1.0.0-alpha.8&prerelease

// Install BlazorInteropGenerator.SourceGenerator as a Cake Tool
#tool nuget:?package=BlazorInteropGenerator.SourceGenerator&version=1.0.0-alpha.8&prerelease

BlazorInteropGenerator

Nuget Nuget) codecov

What is this?

This project contains code and a Source Generator which can convert a TypeScript Definition to C# Interfaces.

How to use the Source Generator

Create a C# Class Library Project. Add the *.d.ts files that you want converted, also download all the dependencies. File names should be the {PackageName}.d.ts without the Organization/. Update the .csproj with the following settings.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="BlazorInteropGenerator.SourceGenerator" Version="1.0.0-*" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
    <AdditionalFiles Include="*.d.ts" />
  </ItemGroup>

</Project>

Create a .cs file with this format, in this case, the TypeScript Definition must contain an interface called "InterfaceName" The Source Generator will generate the interface and all its dependencies.


using BlazorInteropGenerator;

namespace BlazorInteropGenerator.Sample;

[BlazorInteropGenerator("TSD1.d.ts")]
public partial interface InterfaceName
{

}
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha.8 177 11/15/2023
1.0.0-alpha.7 49 9/21/2023
1.0.0-alpha.6 56 9/18/2023
1.0.0-alpha.5 70 9/13/2023
1.0.0-alpha.4 48 9/11/2023
1.0.0-alpha.3 57 9/7/2023
1.0.0-alpha.2 60 9/7/2023
1.0.0-alpha.1 72 9/7/2023