Antelcat.AutoGen
2.0.0-preview6
See the version list below for details.
dotnet add package Antelcat.AutoGen --version 2.0.0-preview6
NuGet\Install-Package Antelcat.AutoGen -Version 2.0.0-preview6
<PackageReference Include="Antelcat.AutoGen" Version="2.0.0-preview6" />
paket add Antelcat.AutoGen --version 2.0.0-preview6
#r "nuget: Antelcat.AutoGen, 2.0.0-preview6"
// Install Antelcat.AutoGen as a Cake Addin #addin nuget:?package=Antelcat.AutoGen&version=2.0.0-preview6&prerelease // Install Antelcat.AutoGen as a Cake Tool #tool nuget:?package=Antelcat.AutoGen&version=2.0.0-preview6&prerelease
Antelcat.AutoGen
π¨π³ δΈζ
Auto generate anything you may want
unless we can't
Supported
Antelcat.AutoGen.ComponentModel
:
[AutoMetadataFrom(Type, MemberTypes)]
Auto generate code using
Template
from target type members[AutoStringTo(string, Accessibility)]
:Auto generate string To extension
only on
assembly
andstatic partial class
Mapping
:[AutoMap(Accessibility)]
:Auto generate mappings between types
Only on
partial method
You can use to generate
shallow copy
[MapBetween(fromProperty, toProperty)]
:Specify property mapping between types
By
: Method being called when mapping this property
[MapIgnore]
:To be ignored when generate mapping code
[MapInclude(property)]
:Explicit include properties when
[MapIgnore]
[MapExclude(string)]
:To be excluded when mapping
[MapConstructor(params string[])]
:Specified property to be added in constructor, will auto-detect if
null
[AutoFilePath]
:Auto generate
FilePath
which isref readonly struct
void Fun([CallerFilePath] string path = "") { var directory = (FilePath)path << 1; var full = directory / "Antelcat.AutoGen.Sample" / "Example.cs"; var changeExtension = full - 2 + ".g.cs"; }
[AutoDeconstructIndexable]
:Auto generate
Deconstruct
method forIList<>
and custom types[assembly: AutoDeconstructIndexable(16/*default size is 16*/, typeof(Foo))] int[] list = [1,2,3]; var (a, b, c) = list; class Foo{ public object this[int index] => index; } var (a, b, c, d) = new Foo();
[AutoExtendFor]
:Auto generate
this
extensions forstatic
method instatic class
class StaticClass { public static void Fun(int i) => Console.WriteLine(i); } [AutoExtendFor(typeof(StaticClass))] static partial class Extension; /// <generated> static partial class Extension { public static void Fun(this int i) => StaticClass.Fun(i); // call original method }
[AutoKeyAccessor]
:Auto generate
object this[string key]
accessor[AutoKeyAccessor] class Foo { public bool Property { get; set; } } /// <generated> partial class Foo { public object? this[string key] { get { switch (key) { case nameof(this.Property): return this.Property; } return null; }; set { switch (key) { case nameof(this.Property): this.Property = (bool)value; break; } }; } }
[AutoUnmamagedArray]
Auto generate user defined length of array items, usually for
Marshal
[AutoUnmamagedArray(nameof(T), 4)] struct CharArray<T> where T : unmanaged{} /// <generated> struct CharArray<T> where T : unmanaged { public T item0; public T item1; public T item2; public T item3; public IEnumerable<T> Enumerate(){ yield return item0; yield return item1; yield return item2; yield return item3; } }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. 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 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. 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. |
-
.NETFramework 4.0
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Antelcat.AutoGen:
Package | Downloads |
---|---|
Antelcat.AspNetCore.WebSocket
Package Description |
|
Antelcat.MediasoupSharp
Cutting Edge WebRTC Video Conferencing ported to .NET from https://github.com/versatica/mediasoup/ |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.3.1 | 0 | 11/17/2024 | |
2.3.0 | 27 | 11/16/2024 | |
2.2.2 | 25 | 11/15/2024 | |
2.2.1 | 31 | 11/15/2024 | |
2.2.0 | 38 | 11/14/2024 | |
2.1.3 | 97 | 11/7/2024 | |
2.1.2 | 67 | 11/5/2024 | |
2.1.1.1 | 64 | 11/4/2024 | |
2.1.1 | 67 | 11/4/2024 | |
2.1.0.1 | 65 | 11/4/2024 | |
2.1.0 | 70 | 11/4/2024 | |
2.0.0 | 71 | 11/2/2024 | |
2.0.0-preview8 | 59 | 10/28/2024 | |
2.0.0-preview7 | 109 | 10/19/2024 | |
2.0.0-preview6 | 117 | 10/18/2024 | |
2.0.0-preview5 | 236 | 10/9/2024 | |
2.0.0-preview4 | 67 | 10/9/2024 | |
2.0.0-preview3 | 123 | 10/3/2024 | |
2.0.0-preview2 | 70 | 9/12/2024 | |
2.0.0-preview10 | 59 | 11/2/2024 | |
2.0.0-preview1 | 85 | 9/12/2024 | |
1.2.7 | 86 | 9/6/2024 | |
1.2.6 | 94 | 7/25/2024 | |
1.2.5 | 89 | 7/25/2024 | |
1.2.4 | 100 | 6/24/2024 | |
1.2.3 | 104 | 6/24/2024 | |
1.2.2 | 104 | 6/18/2024 | |
1.2.1 | 101 | 6/7/2024 | |
1.2.0 | 90 | 6/7/2024 | |
1.1.0.2 | 104 | 6/5/2024 | |
1.1.0.1 | 88 | 6/4/2024 | |
1.1.0 | 103 | 6/4/2024 | |
1.0.1 | 119 | 4/22/2024 | |
1.0.0 | 108 | 4/18/2024 | |
1.0.0-pre-alpha-9 | 103 | 3/12/2024 | |
1.0.0-pre-alpha-8 | 120 | 3/5/2024 | |
1.0.0-pre-alpha-7 | 98 | 2/22/2024 | |
1.0.0-pre-alpha-6 | 87 | 2/8/2024 | |
1.0.0-pre-alpha-5 | 169 | 12/28/2023 | |
1.0.0-pre-alpha-4 | 113 | 12/27/2023 | |
1.0.0-pre-alpha-3 | 111 | 12/27/2023 | |
1.0.0-pre-alpha-2 | 114 | 12/27/2023 | |
1.0.0-pre-alpha-10 | 84 | 3/29/2024 | |
1.0.0-pre-alpha-1 | 136 | 12/20/2023 |
Add deconstruct