This file contains 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
using Newtonsoft.Json; | |
using PeakUp.Email.Manager.Extensions; | |
using PeakUp.Email.Manager.Models; | |
using System; | |
using System.Messaging; | |
namespace PeakUp.Email.Manager | |
{ | |
class Program | |
{ |
This file contains 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
using Newtonsoft.Json; | |
using PeakUp.Employee.Manager.Extensions; | |
using PeakUp.Employee.Manager.Models; | |
using System; | |
using System.Messaging; | |
using System.Threading; | |
namespace PeakUp.Employee.Manager | |
{ | |
class Program |
This file contains 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 Mail | |
{ | |
public Mail(string to, string content) | |
{ | |
this.To = to; | |
this.Content = content; | |
} | |
public string To { get; set; } |
This file contains 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 EmployeeModel | |
{ | |
public EmployeeModel(string name, string mailAddress) | |
{ | |
this.Name = name; | |
this.MailAddress = mailAddress; | |
} | |
public string Name { get; set; } |
This file contains 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 MessageQueueExtensions | |
{ | |
public static MessageQueue CreateIfNotExists(this MessageQueue messageQueue, string queueName) | |
{ | |
//Bu alanda ".\Private$" yolu, oluşturmak/bulmak istediğimiz queue'nin private olduğunu belirtiyor. Ardından dosya yoluna queue ismi ile devam ediyoruz. | |
if (MessageQueue.Exists($@".\Private$\{queueName}")) | |
{ |