fix: reformat using C# rules

This commit is contained in:
ZavaruKitsu
2022-10-08 19:26:34 +03:00
parent a731e2a8d0
commit 5ab15621a0
180 changed files with 13136 additions and 13081 deletions
+1 -1
View File
@@ -9,4 +9,4 @@ public class BotDbContext : DbContext
}
public DbSet<User> Users { get; set; }
}
}
+1 -1
View File
@@ -4,4 +4,4 @@ public class User
{
public long Id { get; set; }
public string LastMessage { get; set; }
}
}
+3 -3
View File
@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.9"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\TelegramBotBase\TelegramBotBase.csproj" />
<ProjectReference Include="..\..\TelegramBotBase\TelegramBotBase.csproj"/>
</ItemGroup>
</Project>
+10 -9
View File
@@ -10,14 +10,15 @@ var serviceCollection = new ServiceCollection()
var serviceProvider = serviceCollection.BuildServiceProvider();
var bot = BotBaseBuilder.Create()
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
.DefaultMessageLoop()
.WithServiceProvider<StartForm>(serviceProvider)
.NoProxy()
.NoCommands()
.NoSerialization()
.DefaultLanguage()
.Build();
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ??
throw new Exception("API_KEY is not set"))
.DefaultMessageLoop()
.WithServiceProvider<StartForm>(serviceProvider)
.NoProxy()
.NoCommands()
.NoSerialization()
.DefaultLanguage()
.Build();
bot.Start();
await Task.Delay(-1);
await Task.Delay(-1);
+1 -1
View File
@@ -33,4 +33,4 @@ public class StartForm : FormBase
user.LastMessage = string.IsNullOrWhiteSpace(message.MessageText) ? "<unknown>" : message.MessageText;
await _dbContext.SaveChangesAsync();
}
}
}