Попытки в мультипарсинг
This commit is contained in:
@@ -29,7 +29,7 @@ namespace CodeBase.Services
|
||||
var chunk = new CodeChunk
|
||||
{
|
||||
FilePath = filePath,
|
||||
MethodName = method.Identifier.Text,
|
||||
EntityName = method.Identifier.Text,
|
||||
Content = method.ToFullString().Trim()
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace CodeBase.Services
|
||||
chunks.Add(new CodeChunk
|
||||
{
|
||||
FilePath = filePath,
|
||||
MethodName = enumSyntax.Identifier.Text, // Сохраняем имя енама
|
||||
EntityName = enumSyntax.Identifier.Text, // Сохраняем имя енама
|
||||
Content = enumSyntax.ToFullString().Trim()
|
||||
});
|
||||
}
|
||||
@@ -84,7 +84,7 @@ namespace CodeBase.Services
|
||||
chunks.Add(new CodeChunk
|
||||
{
|
||||
FilePath = filePath,
|
||||
MethodName = classSyntax.Identifier.Text,
|
||||
EntityName = classSyntax.Identifier.Text,
|
||||
// Сохраняем объявление класса и его свойства
|
||||
Content = $"class {classSyntax.Identifier.Text} {{\n" +
|
||||
string.Join("\n", properties.Select(p => p.ToFullString().Trim())) +
|
||||
@@ -119,7 +119,7 @@ namespace CodeBase.Services
|
||||
{
|
||||
var chunk = new CodeChunk
|
||||
{
|
||||
MethodName = method.Identifier.Text,
|
||||
EntityName = method.Identifier.Text,
|
||||
Content = method.ToFullString(),
|
||||
FilePath = document.FilePath
|
||||
};
|
||||
@@ -140,7 +140,7 @@ namespace CodeBase.Services
|
||||
if (!namespaceName.StartsWith("System") && !namespaceName.StartsWith("Microsoft"))
|
||||
{
|
||||
chunk.OutgoingCalls.Add(methodSymbol.Name);
|
||||
Console.WriteLine($"[ПАРСЕР] Успех: {chunk.MethodName} -> {methodSymbol.Name} ({namespaceName})");
|
||||
Console.WriteLine($"[ПАРСЕР] Успех: {chunk.EntityName} -> {methodSymbol.Name} ({namespaceName})");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,5 +184,7 @@ namespace CodeBase.Services
|
||||
|
||||
return chunksList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user