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
// Open up the NuGet Package Manager in Visual Studio and paste the following line to format every file in the solution. | |
// I'll write a not-so-ugly version later. ;) | |
// BUG! This doesn't recursively grab all files from the project. :( | |
$dte.Solution.Projects | ForEach-Object {$_.ProjectItems | ForEach-Object { if ($_.Name.EndsWith('.cs')) {$window = $_.Open('{7651A701-06E5-11D1-8EBD-00A0C90F26EA}'); if ($window){Write-Host $_.Name;[System.Threading.Thread]::Sleep(100);$window.Activate();$_.Document.DTE.ExecuteCommand('Edit.FormatDocument');$_.Document.DTE.ExecuteCommand('Edit.RemoveAndSort');$window.Close(1);}} }} |
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
internal class JobRegistry :Registry | |
{ | |
public JobRegistry() | |
{ | |
ForSingletonOf<PlaynGO.Common.InversionOfControl.IContainer>().Use<PlaynGO.StructureMap.Container>(); | |
ForSingletonOf<IJobFactory>().Use<WpsJobFactory>(); | |
var col = new NameValueCollection(); | |
ForSingletonOf<ISchedulerFactory>().Use<StdSchedulerFactory>().Ctor<NameValueCollection>("props").Is(ctx => | |
{ |
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
$database_host = "<host>" | |
$database_name = "<database>" | |
$output_file = "<output_file>" | |
$user = "<username>" | |
$password = "<password>" | |
[system.reflection.assembly]::loadWithPartialName('Microsoft.SqlServer.SMO') | |
$server = new-object "Microsoft.SqlServer.Management.Smo.Server" $database_host | |
$server.connectionContext.loginSecure = $false |
NewerOlder