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.Runtime.CompilerServices; | |
namespace BestProgram; | |
internal static class StringTrimExtensions | |
{ | |
#region TrimStartWhiteSpaceAnd | |
[MethodImpl(MethodImplOptions.AggressiveInlining)] | |
public static string TrimStartWhiteSpaceAnd(this string s, char trimChar) |
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
#if !NETSTANDARD2_1_OR_GREATER | |
using System; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
namespace resvg.net | |
{ | |
public sealed class UTF8Marshaler : ICustomMarshaler | |
{ | |
public static readonly UTF8Marshaler Instance = new UTF8Marshaler(); |
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.Text.RegularExpressions; | |
namespace Tools | |
{ | |
public class LazyRegex | |
{ | |
private readonly Lazy<Regex> regex; | |
private Regex Re => regex.Value; |
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
!macro GetFileSizeLocal file defbase | |
!verbose push | |
!verbose 2 | |
!tempfile GetFileSizeLocal_nsi | |
!tempfile GetFileSizeLocal_exe | |
!appendfile "${GetFileSizeLocal_nsi}" 'SilentInstall silent$\nRequestExecutionLevel user$\nOutFile "${GetFileSizeLocal_exe}"$\nPage instfiles$\nSection' | |
!appendfile "${GetFileSizeLocal_nsi}" '$\nFileOpen $0 "${GetFileSizeLocal_nsi}" w$\nFileOpen $1 "${file}" r$\nFileSeek $1 0 END $R0$\nFileClose $1' | |
!appendfile "${GetFileSizeLocal_nsi}" '$\nFileWrite $0 "!define ${defbase} $R0"$\nFileClose $0$\nSectionEnd' | |
!system '"${NSISDIR}\makensis" /V2 "${GetFileSizeLocal_nsi}"' = 0 | |
!system '"${GetFileSizeLocal_exe}"' = 0 |
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.Reflection; | |
using System.Runtime.InteropServices; | |
using Microsoft.Win32; | |
namespace DiskCatalog.Classes | |
{ | |
public sealed class FileAssociation | |
{ | |
public string Extension { get; } |
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 SingleAssemblyResourceManager : ResourceManager | |
{ | |
private readonly Type _resourceSource; | |
private CultureInfo _neutralResourcesCulture; | |
private readonly Dictionary<string, ResourceSet> _resourceSets; | |
private readonly string[] _resourceNames; | |
private SingleAssemblyResourceManager(Type resourceSource) : | |
base(resourceSource) | |
{ |
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.Drawing; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
using System.Threading.Tasks; | |
namespace System.Windows.Forms | |
{ | |
using Point = Drawing.Point; | |
/// <summary> |
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.IO; | |
using System.Text; | |
using System.Web; | |
using System.Web.UI; | |
namespace HenriFormatter | |
{ | |
public static class HenriFormatter | |
{ |
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; | |
using System.Collections.Generic; | |
namespace BiDictionary | |
{ | |
public sealed class BiDictionary<T1, T2> : IEnumerable<KeyValuePair<T1, T2>> | |
{ | |
readonly Dictionary<T1, T2> first; | |
readonly Dictionary<T2, T1> second; |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace MultiReplace | |
{ | |
public sealed class StringMultiReplace | |
{ | |
#region Private Members |