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
| <# | |
| .SYNOPSIS | |
| Decodes a Base64-encoded file or pipeline input into a binary file. | |
| .DESCRIPTION | |
| Reads Base64 text from a file or from pipeline input and decodes it using | |
| FromBase64Transform. The decoded bytes are written to the specified output file. | |
| .PARAMETER InputPath | |
| The path to a file containing Base64-encoded text. | |
| .PARAMETER InputObject | |
| Base64-encoded text received from the pipeline. |
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
| <# | |
| .SYNOPSIS | |
| Encodes a file as a Base64 string. | |
| .DESCRIPTION | |
| Reads the file specified by Path and writes its Base64-encoded contents | |
| to the PowerShell pipeline as an ASCII string. | |
| .PARAMETER Path | |
| Specifies the path of the file to encode. This parameter is mandatory. |
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(SupportsShouldProcess)] | |
| param( | |
| [Parameter(Mandatory, HelpMessage = "Enter the new tag to push.")] | |
| [string]$Tag | |
| ) | |
| function Test-IsGitRepository { | |
| param ( | |
| [string]$Path = (Get-Location).Path | |
| ) |
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
| // ReSharper disable MemberCanBePrivate.Global | |
| using System.Reflection; | |
| using System.Xml.Linq; | |
| namespace XmlDocExtraction; | |
| /// <summary> | |
| /// Provides functionality to extract XML documentation from assemblies. | |
| /// </summary> | |
| /// <remarks> |
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
| <# | |
| .SYNOPSIS | |
| Compare the contents of two folders based on file hashes. | |
| .DESCRIPTION | |
| This script calculates SHA256 hashes for all files in two specified folders | |
| (and their subdirectories) and compares them. It outputs any differences | |
| in file content or structure. | |
| .PARAMETER Folder1 |
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.Diagnostics.CodeAnalysis; | |
| using Microsoft.EntityFrameworkCore.ChangeTracking; | |
| namespace Common; | |
| public static class EntityEntryExtensions | |
| { | |
| extension<TEntity>(EntityEntry<TEntity> entityEntry) where TEntity : class | |
| { |
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 static Dictionary<string, string> GetDatabaseTables(DbContext db) | |
| { | |
| Dictionary<string, string> tablesDictionary = []; | |
| var connection = db.Database.GetDbConnection(); | |
| using var command = connection.CreateCommand(); | |
| command.CommandText = "SELECT name, sql from sqlite_schema where type='table';"; | |
| using var reader = command.ExecuteReader(); | |
| while (reader.Read()) | |
| { | |
| var entityName = reader.GetString(0); |
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
| <#PSScriptInfo | |
| .VERSION 1.0.0 | |
| .AUTHOR Peter Ritchie | |
| .COMPANYNAME | |
| .COPYRIGHT | |
| .TAGS Visual Studio, dotnet |
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
| <#PSScriptInfo | |
| .VERSION 1.0.0 | |
| .AUTHOR Peter Ritchie | |
| .COMPANYNAME | |
| .COPYRIGHT | |
| .TAGS |
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
| <# | |
| .SYNOPSIS | |
| Gets the build validation policies for repositories associated with solution files in the specified path. | |
| .DESCRIPTION | |
| Retrieves and lists the build validation branch policies for repositories that correspond to solution files found in the specified path. | |
| .PARAMETER Path | |
| Specifies the path to search for solution files. | |
| #> | |
| [CmdletBinding()] | |
| param( |
NewerOlder