2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2022-03-09 21:55:30 +03:00
parent 530df018ec
commit 9a174f406f
106 changed files with 5166 additions and 4398 deletions

View File

@ -29,10 +29,11 @@ public class ResourceGeneratorReceiver : ISyntaxContextReceiver
{
// Debugger.Launch();
var url = import.ConstructorArguments.First().Value.ToString();
var urls = import.ConstructorArguments.Select(x => x.Value.ToString());//.ToString();
if (!Imports.Contains(url))
Imports.Add(url);
foreach(var url in urls)
if (!Imports.Contains(url))
Imports.Add(url);
}
if (attrs.Any(a => a.AttributeClass.ToDisplayString() == "Esiur.Resource.ResourceAttribute"))
@ -48,6 +49,7 @@ public class ResourceGeneratorReceiver : ISyntaxContextReceiver
var fields = cds.Members.Where(x => x is FieldDeclarationSyntax)
.Select(x => context.SemanticModel.GetDeclaredSymbol((x as FieldDeclarationSyntax).Declaration.Variables.First()) as IFieldSymbol)
.Where(x => !x.IsConst)
.Where(x => x.GetAttributes().Any(a => a.AttributeClass.ToDisplayString() == "Esiur.Resource.PublicAttribute"))
.ToArray();