datamemberattribute
This commit is contained in:
parent
6a0424d9f1
commit
1bc9349f60
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
.vscode/
|
||||||
output/
|
output/
|
||||||
__pycache__
|
__pycache__
|
||||||
regular.cs
|
regular.cs
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using MySqlConnector;
|
using MySqlConnector;
|
||||||
using de.hottis.genericdatabaseapiservice.Models;
|
using de.hottis.genericdatabaseapiservice.Models;
|
||||||
|
|
||||||
@ -27,7 +28,10 @@ namespace de.hottis.genericdatabaseapiservice.Services {
|
|||||||
using (var reader = await cmd.ExecuteReaderAsync()) {
|
using (var reader = await cmd.ExecuteReaderAsync()) {
|
||||||
while (await reader.ReadAsync()) {
|
while (await reader.ReadAsync()) {
|
||||||
foreach (var propertyInfo in typeof(T).GetProperties()) {
|
foreach (var propertyInfo in typeof(T).GetProperties()) {
|
||||||
Console.WriteLine(propertyInfo);
|
Console.WriteLine("Property name: {0}", propertyInfo);
|
||||||
|
var attributes = propertyInfo.GetCustomAttributes(typeof(DataMemberAttribute), true);
|
||||||
|
var dma = (DataMemberAttribute)attributes[0];
|
||||||
|
Console.WriteLine("DataMember name: {0} {1} ", dma.Name, dma.TypeId);
|
||||||
}
|
}
|
||||||
Console.WriteLine(reader.GetString("txt"));
|
Console.WriteLine(reader.GetString("txt"));
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ $paramsInputType['type'] $paramsInputType['name'] #slurp
|
|||||||
[FromBody]$operation['bodyInputType']['csName'] $operation['bodyInputType']['apiName'] #slurp
|
[FromBody]$operation['bodyInputType']['csName'] $operation['bodyInputType']['apiName'] #slurp
|
||||||
#end if
|
#end if
|
||||||
) {
|
) {
|
||||||
_dbService.JustDoSomething("Hello ${operation['func']}");
|
_dbService.JustDoSomething<$operation['resultType']['csName']>("Hello ${operation['func']}");
|
||||||
|
|
||||||
// Statement:
|
// Statement:
|
||||||
#if not $operation['statement']
|
#if not $operation['statement']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user