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
# A couple of references: | |
# - https://github.com/twright-msft/mssql-node-docker-demo-app (sql setup, but at run-time) | |
# - https://www.wintellect.com/devops-sql-server-dacpac-docker/ (build-time setup, but of DACPAC) | |
FROM mcr.microsoft.com/mssql/server:2017-latest AS final | |
# Copy schema.sql from wherever into a tmp directory in the image | |
# This file is assumed to include all your DB objects as CREATE statements | |
COPY /TestDatabase/schema.sql /tmp/schema.sql |
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
# This dockerfile is a combination of two things: | |
# * A dotnet build of a csproj assumed to use the SqlProj SDK found here - https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/ | |
# * Building on a SQL Server image to deploy a DACPAC, adapted from https://www.wintellect.com/devops-sql-server-dacpac-docker/ | |
# First, the dotnet build of the DACPAC. The csproj referenced here should be | |
# one that uses this SDK: https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/ | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build | |
WORKDIR /src | |
COPY ["TestDb/TestDb.csproj", "TestDb/"] | |
RUN dotnet restore "TestDb/TestDb.csproj" |
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.Reflection; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
/// <summary> | |
/// Decomposes <see paramref="TValue"/> objects and stores their properties in separate backing stores. | |
/// Useful if individual properties can be stored more efficiently (e.g. spatial indexing). | |
/// </summary> | |
/// <typeparam name="TKey">The type of the key by which objects will be stored.</typeparam> |
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.CodeAnalysis.CSharp.Scripting; | |
using Microsoft.CodeAnalysis.Scripting; | |
using System; | |
using System.Collections.Generic; | |
using System.Composition; | |
using System.Composition.Hosting; | |
using System.Composition.Hosting.Core; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; |
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.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// Prefix tree implementation. | |
/// </summary> | |
/// <typeparam name="TKey">The type of the individual elements of the keys in the trie.</typeparam> | |
/// <typeparam name="TValue">The type of values in the trie.</typeparam> |
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.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
class BatchingPipelineDemo | |
{ | |
// "Environmental" factors | |
private static Random Rnd = new Random(); |