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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net.Security; | |
using System.Net.Sockets; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using ICSharpCode.SharpZipLib.Zip.Compression; | |
using ICSharpCode.SharpZipLib.Zip.Compression.Streams; | |
using Microsoft.Extensions.Logging; |
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
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Usenet.Extensions | |
{ | |
public static class TaskExtensions | |
{ | |
public static async Task<TResult> TimeoutAfter<TResult>(this Task<TResult> task, TimeSpan timeout) | |
{ |
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
using System; | |
using System.Collections.Concurrent; | |
using System.Threading; | |
using Microsoft.Extensions.Logging; | |
namespace Usenet.Util | |
{ | |
public class PipeStream : AbstractBaseStream | |
{ | |
private class Chunk |
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
using System.Linq; | |
namespace ConsoleApp1 | |
{ | |
public static class Crc32 | |
{ | |
private const uint polynomial = 0xEDB88320; | |
private const uint seed = 0xFFFFFFFF; | |
private static readonly uint[] lookupTable; |
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 OpenPathsRequest | |
{ | |
private static DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
private const string accessKey = "your personal access key"; | |
private const string secretKey = "your personal secret"; | |
private const string url = "https://openpaths.cc/api/1"; | |
private OAuthSession session; | |
public OpenPathsRequest() |