Skip to content

к/р 2#7

Merged
bygu4 merged 9 commits intotestsfrom
test2
Apr 12, 2025
Merged

к/р 2#7
bygu4 merged 9 commits intotestsfrom
test2

Conversation

@bygu4
Copy link
Copy Markdown
Owner

@bygu4 bygu4 commented Dec 5, 2024

No description provided.

Copy link
Copy Markdown

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIffClasses не поддерживается, и CI сломан

Comment thread Test2.sln Outdated
@@ -0,0 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Какой-то лишний .sln, из-за которого CI ломается

Comment thread Tasks/Test2/Test2/Test2.csproj Outdated
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Уже .NET 9.0 актуален

@@ -0,0 +1,17 @@
public class TestClass1
{
public int testField1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Точки с запятой печатаются только после полей и только во вложенных классах? Интересная избирательность :)

public int testField1
private static string testField2

public int TestMethod1(float attribute1)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И для методов я бы просто {} выводил (и return default для не-void), чтобы повысить шансы на компилируемость


using System.Reflection;

public static class Reflector
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо комментарии

Comment thread Tasks/Test2/Test2/Reflector.cs Outdated

public static class Reflector
{
private const string Tab = " ";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы назвал Indent или как-то так, тем более что это четыре пробела

else if (method.IsPrivate)
{
signature += "private ";
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected не поддерживаете? Правильно, protected зло.

}

signature += classInfo.Name;
return signature;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ещё неплохо бы наследование и реализацию интерфейсов

foreach (var method in someClass.GetMethods())
{
await PrintMethod(method, numberOfTabs + 1, writer);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Конструкторы не поддерживаются вроде

public static float TestMethod2()
private string TestMethod3(string attribute1, int attribute2)

private class NestedClass
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 за поддержку вложенных классов, больше почти никто с ними не возился.

@bygu4 bygu4 changed the base branch from main to tests April 12, 2025 18:50
@bygu4 bygu4 merged commit fe38434 into tests Apr 12, 2025
4 checks passed
@bygu4 bygu4 deleted the test2 branch April 12, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants