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 ScriptCs.Contracts; | |
namespace ScriptCs.Exec | |
{ | |
[Module("print", Extensions = "csx")] | |
public class PrintModule : IModule | |
{ | |
public void Initialize(IModuleConfiguration config) | |
{ |
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 ScriptCs.Contracts; | |
namespace ScriptCs.Exec | |
{ | |
public class PrintLinePreprocessor : DirectiveLineProcessor | |
{ | |
public PrintLinePreprocessor() | |
{ | |
Console.WriteLine("PrintLinePreprocessor created"); |
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
#print hello world | |
Console.WriteLine("Done"); |
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.Collections.Generic; | |
using System.Linq; | |
using Common.Logging; | |
using ScriptCs.Contracts; | |
namespace ScriptCs.Exec | |
{ | |
public class PrintFilePreprocessor : FilePreProcessor | |
{ | |
public PrintFilePreprocessor(IFileSystem fileSystem, ILog logger, IEnumerable<ILineProcessor> lineProcessors) |
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
public interface IDirectiveLineProcessor : ILineProcessor | |
{ | |
bool Matches(string line); | |
} | |
public abstract class DirectiveLineProcessor : ILineProcessor | |
{ | |
... | |
public bool Matches(string line) | |
{ |
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
Console.WriteLine("Hello from https://gist.github.com/ryanrousseau/0dca8b3a74958f82406a !"); |
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
Write-Output "Checking ChocolateyInstall env variable" | |
$chocolateyInstall = [Environment]::GetEnvironmentVariable("ChocolateyInstall") | |
if (!$chocolateyInstall) { | |
Write-Output "ChocolateyInstall env variable does not exist, using $ChocolateyInstallDir" | |
$chocolateyInstall = $ChocolateyInstallDir | |
[Environment]::SetEnvironmentVariable("ChocolateyInstall", $chocolateyInstall) | |
[Environment]::SetEnvironmentVariable("ChocolateyInstall", $chocolateyInstall, "Machine") | |
} |
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
#load "scriptTables.csx | |
ScriptTables("server", "db", "targetDirectoryPath"); |
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
public class Greeter | |
{ | |
public void Greet(string message) | |
{ | |
Console.WriteLine(message); | |
} | |
} |
OlderNewer