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
var connectionFactory = new ConnectionFactory() | |
{ | |
HostName = hostname, | |
UserName = username, | |
Password = password, | |
Port = port, | |
RequestedConnectionTimeout = 2000, // Milliseconds | |
}; | |
return connectionFactory.CreateConnection(); |
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
private void ConnectOrFail(ITcpClient socket, AmqpTcpEndpoint endpoint, int timeout) | |
{ | |
try | |
{ | |
socket.ConnectAsync(endpoint.HostName, endpoint.Port) | |
.TimeoutAfter(timeout) | |
.ConfigureAwait(false) | |
.GetAwaiter().GetResult(); | |
} | |
//... |
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
#if CORECLR | |
await sock.ConnectAsync(ep, port).ConfigureAwait(false); | |
#else | |
sock.Connect(ep, port); | |
#endif |
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
await Task.Run(() => sock.Connect(ep, port)); |
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 Microsoft.Office.Interop.Excel; | |
using System; | |
using System.Runtime.InteropServices; | |
namespace ExcelToPdf | |
{ | |
public class ExcelApplicationWrapper : IDisposable | |
{ | |
public Application ExcelApplication { get; } |
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 System.Collections.Generic; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
namespace ExcelToPdf | |
{ | |
public class ExcelInteropExcelToPdfConverter | |
{ | |
public void ConvertToPdf(IEnumerable<string> excelFilesPathToConvert) | |
{ |
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 System; | |
using System.IO; | |
namespace ExcelToPdf | |
{ | |
internal static class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
string directoryWithExcelFiles; |
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
.enlarging-title { | |
font-size: 30px; | |
color: black; | |
transition: all 0.3s ease; | |
} | |
.enlarging-title:hover { | |
font-size: 40px; | |
color: blue; | |
transition: all 0.3s ease; |
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
.link { | |
animation: seek-attention 2s infinite; | |
font-size: 30px; | |
animation-play-state: running; | |
} | |
.link:hover { | |
animation-play-state: paused; | |
} |
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
.astroboy { | |
display: block; | |
width: 151px; | |
height: 193px; | |
background: url('astroboy.png') left center; | |
animation: astroboy 0.8s steps(20) infinite; | |
} | |
.astroboy:hover { | |
animation-play-state: paused; |
OlderNewer