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 static string convertWildcardToRegex(string pattern) | |
{ | |
// http://stackoverflow.com/a/6907849/107625 | |
// http://www.codeproject.com/Articles/11556/Converting-Wildcards-to-Regexes | |
return "^" + Regex.Escape(pattern). | |
Replace("\\*", ".*"). | |
Replace("\\?", ".") + "$"; | |
} |
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
/// <description> | |
/// Calculates the total number of days passed sind first of January 2000 | |
/// until a given Date. | |
/// </description> | |
public static long DayOfCentury(DateTime dt) | |
{ | |
var span = dt.Date - new DateTime(2000, 1, 1); | |
return (long)span.TotalDays; | |
} |
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
namespace ZetaProducer.RuntimeBusinessLogic.Rendering.Helper | |
{ | |
using AngleSharp.Dom; | |
using AngleSharp.Parser.Html; | |
using System.Linq; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
public static class Texturizer | |
{ |
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
namespace Helper | |
{ | |
using System; | |
using System.IO; | |
using System.Reflection; | |
/// <summary> | |
/// The shortest possible logger. | |
/// </summary> | |
public static class QuickLogger |
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 bool IsOutlookInstalled() | |
{ | |
Type requestType = Type.GetTypeFromProgID("Outlook.Application", false); | |
if (requestType == null) | |
{ | |
RegistryKey key = null; | |
try | |
{ | |
key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Office", false); | |
if (key != null) |
NewerOlder