Skip to content

Commit b123491

Browse files
committed
first
1 parent 8f8ae7f commit b123491

8 files changed

Lines changed: 86 additions & 4 deletions

File tree

v2/RSCGExamplesData/GeneratorDataRec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,5 +1552,11 @@
15521552
"Category": 10,
15531553
"dtStart": "2026-02-14T00:00:00",
15541554
"show": true
1555+
},
1556+
{
1557+
"ID":"Pekspro.DataAnnotationValuesExtractor",
1558+
"Category": 5,
1559+
"dtStart": "2026-02-15T00:00:00",
1560+
"show": true
15551561
}
15561562
]

v2/RSCGExamplesData/NoExample.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -988,13 +988,13 @@
988988
"why":"later"
989989
},
990990
{
991-
"ID":252,
992-
"name":"https://github.com/pekspro/DataAnnotationValuesExtractor",
991+
"ID":253,
992+
"name":"https://github.com/sebastienros/comptime",
993993
"why":"later"
994994
},
995995
{
996-
"ID":253,
997-
"name":"https://github.com/sebastienros/comptime",
996+
"ID":254,
997+
"name":"https://github.com/gumbarros/EndpointHelpers",
998998
"why":"later"
999999
}
10001000

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"generator":{
3+
"name":"Pekspro.DataAnnotationValuesExtractor",
4+
"nuget":[
5+
"https://www.nuget.org/packages/Pekspro.DataAnnotationValuesExtractor/"
6+
],
7+
"link":"",
8+
"author":"",
9+
"source":""
10+
},
11+
"data":{
12+
"goodFor":[""],
13+
"csprojDemo":"Pekspro.DataAnnotationValuesExtractorDemo.csproj",
14+
"csFiles":["Program.cs"],
15+
"excludeDirectoryGenerated":[""],
16+
"includeAdditionalFiles":[""]
17+
},
18+
"links":{
19+
"blog":"",
20+
"video":""
21+
}
22+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="Attr/Attr.csproj" />
3+
</Solution>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net10.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="Pekspro.DataAnnotationValuesExtractor" Version="1.0.0" />
12+
</ItemGroup>
13+
<PropertyGroup>
14+
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
15+
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
16+
</PropertyGroup>
17+
</Project>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations;
4+
using System.Text;
5+
6+
namespace Attr;
7+
8+
partial class Person
9+
{
10+
[Display(Name = "First name")]
11+
[Required]
12+
[StringLength(100,MinimumLength =3)]
13+
public string? FirstName { get; set; }
14+
15+
[Required]
16+
[Range(18, 200)]
17+
public int Age { get; set; }
18+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// See https://aka.ms/new-console-template for more information
2+
using Attr;
3+
4+
Console.WriteLine(Person.Annotations.Age.Minimum);
5+
Console.WriteLine(Person.Annotations.FirstName.MinimumLength);
6+
Console.WriteLine(Person.Annotations.FirstName.MaximumLength);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Pekspro.DataAnnotationValuesExtractor;
2+
3+
namespace Attr;
4+
5+
6+
[DataAnnotationValuesOptions(StringLength = true, Range = true, Required = true, Display = true)]
7+
[DataAnnotationValuesToGenerate(typeof(Person))]
8+
partial class Values
9+
{
10+
}

0 commit comments

Comments
 (0)