This file contains 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
trigger: none | |
variables: | |
artifact.name: drop | |
vmImage: 'ubuntu-latest' | |
pool: 'DockerAgentPool' | |
buildConfiguration: 'release' | |
group: 'my-ado-variables' | |
This file contains 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 static void AddQueryFilter<T>(this EntityTypeBuilder entityTypeBuilder, Expression<Func<T, bool>> expression) | |
{ | |
var parameterType = Expression.Parameter(entityTypeBuilder.Metadata.ClrType); | |
var expressionFilter = ReplacingExpressionVisitor.Replace( | |
expression.Parameters.Single(), parameterType, expression.Body); | |
var currentQueryFilter = entityTypeBuilder.Metadata.GetQueryFilter(); | |
if (currentQueryFilter != null) | |
{ | |
var currentExpressionFilter = ReplacingExpressionVisitor.Replace( |
This file contains 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
mode: Mainline | |
# | |
assembly-versioning-scheme: MajorMinorPatchTag | |
assembly-file-versioning-scheme: MajorMinorPatchTag | |
assembly-informational-format: '{InformationalVersion}' | |
# | |
major-version-bump-message: '\+semver:\s?(breaking|major)' | |
minor-version-bump-message: '\+semver:\s?(feature|minor)' | |
patch-version-bump-message: '\+semver:\s?(fix|patch)' | |
no-bump-message: '\+semver:\s?(none|skip)' |
This file contains 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
# clone this first: | |
# https://github.com/flacle/truegitcodechurn | |
python ./gitcodechurn.py after="2023-07-01" before="2023-10-31" author="" dir="/c/path/to/repo" -exdir="excluded-directory" |
This file contains 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
#!/bin/bash | |
git --version | |
BUILD_SOURCE_BRANCH=$1 | |
if [[ -z ${BUILD_SOURCE_BRANCH} ]]; then | |
echo "Null source branch" | |
exit 1 | |
fi | |
git config --global user.email "[email protected]" |
This file contains 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.Net; | |
using System.Net.Http.Headers; | |
using Moq; | |
using Moq.Protected; | |
using Newtonsoft.Json; | |
namespace Example.Test.Helpers; | |
public class HttpClientTestHelper | |
{ |
This file contains 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 HttpClientLoggingHandler: DelegatingHandler | |
{ | |
private readonly ILogger _logger; | |
public HttpClientLoggingHandler(ILogger logger) | |
{ | |
_logger = logger; | |
InnerHandler = new HttpClientHandler(); | |
} |
This file contains 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 HttpContextLoggingMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
private readonly ILogger _logger; | |
private const int BodyLogSizeLimit = 4096; | |
public HttpContextLoggingMiddleware( | |
RequestDelegate next, | |
ILogger logger) | |
{ |
This file contains 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
- task: PowerShell@2 | |
displayName: "NuGet packages vulnerabilities scan" | |
continueOnError: false | |
inputs: | |
filePath: '$(Build.SourcesDirectory)/nuget-vunerability-build-fail-report.ps1' | |
arguments: '''$(Build.SourcesDirectory)'' ''$(SolutionName)''' | |
pwsh: true |
This file contains 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
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } |
NewerOlder