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
##################################### | |
# About | |
##################################### | |
# This is a PowerShell port of Aaron Bernstein's NodeJS code by Arlo Godfrey. | |
# Unflattens and nests the namespaces in a standard DocFx toc.yaml | |
# Source: https://github.com/dotnet/docfx/issues/274#issuecomment-456168196 | |
# Last updated 5/14/2022. | |
# Licensed under MIT. | |
##################################### |
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.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace AppName | |
{ | |
public class InstanceContainer | |
{ | |
public InstanceContainer(WeakReference<object> instance) |
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
// Run at least once. Directory is the directory to check, Datapath should point to a json file with an empty array (`[]`) where Node can store file data | |
function checkForChangedFiles(directory, datapath) { | |
return new Promise(resolve => { | |
let filedata = require(datapath); | |
let changedfiles = []; | |
fs.readdir(directory, async (err, files) => { | |
if (err) throw new Error('Unabled to check for existing files. Reason: readdir failed. \n' + err); | |
for (let i in files) { | |
if ((function() { |