View Build.cs
using Nuke.Common; | |
using Nuke.Common.Execution; | |
using Nuke.Common.Tools.GitVersion; | |
using static Nuke.Common.IO.FileSystemTasks; | |
using static Nuke.Common.Tools.Npm.NpmTasks; | |
using static Nuke.Common.ChangeLog.ChangelogTasks; | |
using static Nuke.Common.IO.TextTasks; | |
using static Nuke.GitHub.GitHubTasks; | |
using Nuke.GitHub; | |
using Nuke.Common.Git; |
View AssemblyInfo.cs
using Xunit; | |
// This is required to have the IAssemblyFixture from the Xunit.Extensions.Ordering Package available | |
[assembly: TestFramework("Xunit.Extensions.Ordering.TestFramework", "Xunit.Extensions.Ordering")] |
View Jenkinsfile
pipeline { | |
triggers { | |
cron('0 0 1 * *') | |
} | |
agent { | |
node { | |
label 'master' | |
customWorkspace 'workspace/JenkinsBackup' | |
} | |
} |
View E2eTestsBase.cs
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
using OpenQA.Selenium.Remote; | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Reflection; | |
using System.Threading.Tasks; | |
using Xunit; |
View first_approach.cs
_requestUrl | |
.Subscribe(async url => | |
{ | |
var response = await httpClient.GetAsync(url); | |
// Update the list | |
}); |
View RevitApi_Correct.cs
var callbackStack = new Stack<Action>(); | |
uiapp.Idling += (s, e) => | |
{ | |
if (callbackStack.Any()) | |
{ | |
var action = callbackStack.Pop(); | |
action.Invoke(); | |
} | |
}; |
View NuGet.Config
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<add key="nuget.org" value="https://www.myget.org/F/dangl-ava/auth/<YOUR_API_KEY>/api/v3/index.json" protocolVersion="3" /> | |
</packageSources> | |
</configuration> |
View DatabaseContext.cs
protected override void OnModelCreating(ModelBuilder builder) | |
{ | |
base.OnModelCreating(builder); | |
if (Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite") | |
{ | |
// SQLite does not have proper support for DateTimeOffset via Entity Framework Core, see the limitations | |
// here: https://docs.microsoft.com/en-us/ef/core/providers/sqlite/limitations#query-limitations | |
// To work around this, when the Sqlite database provider is used, all model properties of type DateTimeOffset | |
// use the DateTimeOffsetToBinaryConverter |
View Build.cs
Target E2ETests => _ => _ | |
.DependsOn(BuildDocker) | |
.DependsOn(Clean) | |
.Executes(async () => | |
{ | |
IProcess dockerComposeProcess = null; | |
// Start the docker environment in a non-blocking way | |
var dockerComposeUpTask = Task.Run(() => | |
{ | |
dockerComposeProcess = ProcessTasks.StartProcess("docker-compose", "up"); |
View ExportToOenorm.cs
private async Task TransformToOenormAsync() | |
{ | |
var convertedProject = Dangl.Oenorm.Converter.ConvertToOenorm(_readProject, OenormDestinationType.LV2015); | |
using (var oenormStream = Dangl.Oenorm.Writer.OenormWriter.GetStream(convertedProject)) | |
{ | |
var outputPath = Path.GetFullPath(_options.OutputFilePath); | |
using (var fileStream = File.Create(outputPath)) | |
{ | |
await oenormStream.CopyToAsync(fileStream); | |
} |
NewerOlder