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 Aspire.Hosting; | |
| using Aspire.Hosting.ApplicationModel; | |
| using Aspire.Hosting.Eventing; | |
| using Aspire.Hosting.Lifecycle; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Logging; | |
| using System.Text.Json; | |
| public sealed class FileResource(string name, string fileName) : Resource(name), IResourceWithEnvironment, IResourceWithWaitSupport | |
| { |
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.Globalization; | |
| using System.Linq; | |
| using Microsoft.ApplicationInsights; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.DependencyInjection.Extensions; | |
| using Microsoft.Extensions.Logging; | |
| namespace Telemetry |
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
| $script:perfstack = @() | |
| $fullperfnames = $false | |
| function measure-function([string] $__name, [scriptblock] $__command) { | |
| $__result = $null | |
| $__cmd = { | |
| $__result = Invoke-Command $__command | |
| } | |
| if ($script:perfstack -eq $null) { |
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
| Some powershell scripts helpful in mercurial repository conversion |
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
| describe "DS"{ | |
| it "skipped" {} -skip | |
| it "pending" {} -Pending | |
| It "throw" { throw "sdfad" } | |
| It "assertion fail" {1 | should be 10 } | |
| It "string assertion fail" {"asdf" | should be "ffsad" } | |
| it "success" {"adsf"} | |
| } |
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
| [cmdletbinding()] | |
| param( | |
| [Parameter(Mandatory=$true)]$repo, | |
| [Parameter(Mandatory=$true)]$targetdir, | |
| $offset = 0, | |
| $batchsize = 50, | |
| $total = 40000 | |
| ) | |
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
| ######################################################################################### | |
| # | |
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| # | |
| # PowerShellGet Module | |
| # | |
| ######################################################################################### | |
| Microsoft.PowerShell.Core\Set-StrictMode -Version Latest |
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
| ######################################################################################### | |
| # | |
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| # | |
| # PowerShellGet Module | |
| # | |
| ######################################################################################### | |
| Microsoft.PowerShell.Core\Set-StrictMode -Version Latest |
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
| $root = "." | |
| if (![string]::IsNullOrEmpty($PSScriptRoot)) { | |
| $root = $PSScriptRoot | |
| } | |
| #if ($MyInvocation.MyCommand.Definition -ne $null) { | |
| # $root = $MyInvocation.MyCommand.Definition | |
| #} | |
| $helpersPath = $root | |
| # grab functions from files |
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
| [CmdletBinding()] | |
| param ($path = ".", [switch][bool]$importonly) | |
| function get-envinfo($checkcommands) { | |
| $result = @{} | |
| write-verbose "Powershell version:" | |
| $result.PSVersion = $PSVersionTable.PSVersion | |
| $result.PSVersion | format-table | out-string | write-verbose |
NewerOlder