This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
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 EsBankAccount | |
| { | |
| // events | |
| public interface IBankAccountEvent { } | |
| public record Transaction(decimal Amount, DateTime Date); | |
| public record Deposited(Transaction Transaction) : IBankAccountEvent; | |
| public record Withdrawn(Transaction Transaction) : IBankAccountEvent; | |
| public record Closed(DateTime Date) : IBankAccountEvent; | |
| // commands |
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
| private static int SchemaCompare(string scmpPath, string databaseName, string outputPath) | |
| { | |
| var schemaComparison = new SchemaComparison(scmpPath); | |
| var result = schemaComparison.Compare(); | |
| if (result.IsEqual) | |
| { | |
| Console.WriteLine("No differences detected."); | |
| return 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
| namespace MyApp.Web.Security | |
| { | |
| using System; | |
| using System.Configuration; | |
| using System.Reflection; | |
| using System.Web; | |
| using System.Web.Configuration; | |
| public class MachineKeys | |
| { |
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
| param([string]$publishSettingsFileLocation, [string]$azureSubscriptionName, [string]$storageAccount, [string]$packagePath, [string]$packageName, [string]$containerName, [string]$serviceName, [string]$configPath, [Int32]$instancePollLimit = 1200, [Int32]$instancePollRate = 60, [string]$removeStagingInstance) | |
| #The old publish settings file - use Get-AzurePublishSettingsFile to https://windows.azure.com/download/publishprofile.aspx to get the file | |
| Write-Host "publishSettingsFileLocation is $publishSettingsFileLocation" | |
| #The azure subscription name related to the account, eg. "Window Azure MSDN - Visual Studio Premium" | |
| Write-Host "azureSubscriptionName is $azureSubscriptionName" | |
| #The storage account where to upload the package. It must exist. E.g. mystorageaccountforupload | |
| Write-Host "storageAccount is $storageAccount" |