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 ISqlCommandFactory | |
| { | |
| SqlCommand GetCommand(SqlConnection connection, string storedProcedure, | |
| SqlParameter[]? parameters = null); | |
| } | |
| public class SqlCommandFactory : ISqlCommandFactory | |
| { | |
| public SqlCommand GetCommand(SqlConnection connection, string storedProcedure, | |
| SqlParameter[]? parameters = 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
| #!/bin/bash | |
| # Requires Homebrew be installed | |
| declare -a apps=( | |
| "git" "gitkraken" "dotnet" "iterm2" "visual-studio-code" "rider" "datagrip" "github/gh/gh" | |
| "nvm" "adr-tools" "monodraw" "freedom" "kiwi-for-g-suite" "alfred" "bartender" "lastpass" | |
| "moom" "karabiner-elements" "sensei" "wget" "spotify" "ubar" "docker" | |
| "docker-compose" "notion" "slack" "postman" "oracle-jdk" "google-cloud-sdk" "node@10" | |
| "keyboard-maestro" "fzf" "lastpass-cli") | |
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
| $packages = @( | |
| #dev tools | |
| "jetbrains-rider", | |
| "dotcover", | |
| "dotpeek", | |
| "dotmemory", | |
| "dottrace", | |
| "vscode", | |
| "gitkraken", |
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
| function Needs-Updating([string] $content){ | |
| if($content -match "PK_" -and $content -match "Id"){ | |
| return $false | |
| } | |
| return $true | |
| } | |
| function Remove-PrimaryKey([string]$content){ | |
| return $content -replace " PRIMARY KEY", "" |
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 UserService | |
| { | |
| [Cache] | |
| public User GetUserById(int id) | |
| { | |
| // your logic goes here | |
| } | |
| [Cash] | |
| public IEnumerable<UserRole> GetByUser(User user) |
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 stitac class DependencyInjectionConfiguration | |
| { | |
| public static void Register(ContainerBuilder builder, | |
| ICacheKeyRegistrationService cacheKeyRegistrationService) | |
| { | |
| Cash.RegisterCacheInfrastructure(builder, | |
| MemoryCache.Default, | |
| cacheKeyRegistrationService); | |
| builder.RegisterType<UserService>() |
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 System.Security.Cryptography; | |
| using System.Text; | |
| using Newtonsoft.Json; | |
| namespace ConsoleApplication1 |
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
| namespace MyApplication.CustomBootstrapper | |
| { | |
| public abstract class CaliburnAutofacApplication : CaliburnApplication | |
| { | |
| protected IContainer Container; | |
| private readonly ContainerBuilder _builder; | |
| private FrameAdapter _rootFrame; | |
| protected CaliburnAutofacApplication() | |
| { |