This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MessageSender : BackgroundService | |
| { | |
| private readonly byte[] _dummyData = new byte[2048]; | |
| private IHubContext<MyHub> _hub; | |
| private readonly CancellationTokenSource cts = new(TimeSpan.FromSeconds(20)); | |
| public MessageSender(IHubContext<MyHub> hubContext) | |
| { | |
| _hub = hubContext; | |
| Random.Shared.NextBytes(_dummyData); |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP TABLE IF EXISTS `airports`; | |
| CREATE TABLE IF NOT EXISTS `airports` ( | |
| `code` varchar(50) COLLATE utf8_turkish_ci DEFAULT NULL, | |
| `name` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL, | |
| `cityCode` varchar(50) COLLATE utf8_turkish_ci DEFAULT NULL, | |
| `cityName` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL, | |
| `countryName` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL, | |
| `countryCode` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL, | |
| `timezone` varchar(8) COLLATE utf8_turkish_ci DEFAULT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| rabbit-mq: | |
| image: rabbitmq:management-alpine | |
| container_name: RabbitMQServer | |
| ports: | |
| - "15672:15672" | |
| hostname: rbmq | |
| restart: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class ConvertNumberExtensions | |
| { | |
| public static string ConvertDigitChar(this string str, CultureInfo source, CultureInfo destination) | |
| { | |
| for (int i = 0; i <= 9; i++) // from number 0 to 9 | |
| { | |
| str = str.Replace(source.NumberFormat.NativeDigits[i], destination.NumberFormat.NativeDigits[i]); | |
| } | |
| return str; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; /* version of the protocol buffers language */ | |
| option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos"; | |
| /*You can declare enumerations at the top level in a .proto file, or nested within a message definition*/ | |
| enum TicketStatus { | |
| option allow_alias = true; /*you can declare multiple fields with the same value.*/ | |
| NEW = 0; | |
| OPEN = 1; | |
| INPROGRESS = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; /* version of the protocol buffers language */ | |
| option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos"; | |
| message CreateTicketDto { | |
| int32 user_id = 1; | |
| int32 category_id = 2; | |
| string title = 3; | |
| string description = 4; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; /* version of the protocol buffers language */ | |
| option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos"; | |
| /* Protobuf enumeration definitions must have a zero constant as their first field */ | |
| enum TicketStatus { | |
| NEW = 0; | |
| OPEN = 1; | |
| INPROGRESS = 3; | |
| CLOSED = 4; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; /* version of the protocol buffers language */ | |
| option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos"; | |
| message CreateTicketDto { | |
| int32 user_id = 1; | |
| int32 category_id = 2; | |
| string title = 3; | |
| string description = 4; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; | |
| option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos"; | |
| message ScalarDataTypes { | |
| bool bool_field = 1;// bool | |
| string string_field = 2;// string | |
| bytes byte_string_field = 3;// byte[] | |
| double double_field = 4; // double | |
| float float_field = 5; // float | |
| int32 int_field = 6;// int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; /* version of the protocol buffers language */ | |
| option csharp_namespace = "DNZ.TicketingSystem.GrpcServer.Protos"; | |
| message CreateTicketDto { | |
| int32 user_id = 1; | |
| int32 category_id = 2; | |
| string title = 3; | |
| string description = 4; | |
| } |
NewerOlder