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
#region Compiled CSS Regex; Should be Singletons | |
public Regex SelectCssComments { get; } = new (@"\/\*.*?\*\/", RegexOptions.Compiled); // Select comment blocks | |
public Regex SelectCssLineBreaks { get; } = new (@"[\n\r]+\s*", RegexOptions.Compiled); // Select line breaks and subsequent space | |
// Ensure content property values use quotation marks | |
public Regex SelectCssContentValueWithApostrophes { get; } = new (@"content:\s*'([^']*)';", RegexOptions.Compiled); // Select content properties using apostrophes | |
public Regex SelectCssContentValueWithSpacePrefix { get; } = new ("""content:\s{1,}"([^\"]*)";""", RegexOptions.Compiled); Select content properties with space between the name and value | |
public Regex SelectCssEmptyContentValueWithSpacePrefix { get; } = new ("""content:\s*"";""", RegexOptions.Compiled); // Select empty content properties |
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
# Docker image with msssql 2022 with full text search enabled | |
# based on work in: https://github.com/Microsoft/mssql-docker | |
# Base OS layer: Latest Ubuntu LTS | |
FROM --platform=linux/amd64 ubuntu:focal | |
# Install prerequistes since it is needed to get repo config for SQL server | |
RUN export DEBIAN_FRONTEND=noninteractive && \ | |
apt-get update && \ | |
apt-get install -yq curl apt-transport-https gnupg && \ |
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 DataRecordExtensions | |
{ | |
public static T GetValue<T>(this IDataRecord reader, string columnName) | |
{ | |
object columnValue = reader[columnName]; | |
T returnValue = default(T); | |
if (!(columnValue is DBNull)) | |
{ | |
returnValue = (T)Convert.ChangeType(columnValue, typeof(T)); | |
} |