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
[DataTestMethod] | |
[DataRow(1, 2, 3)] | |
public void Add_Test2(int a, int b, int result) | |
{ | |
Assert.AreEqual(result, Add(a, b)); | |
} |
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
[TestMethod] | |
public void Add_Test() | |
{ | |
Assert.AreEqual(3, Add(1, 2)); | |
} |
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
[DataTestMethod] | |
[DynamicData(nameof(ProjectTestData), DynamicDataSourceType.Method)] | |
public void ScheduleEngine_Data_Driven(Project project, Dictionary<int, DateTime> finishDates) | |
{ | |
Assert.IsNotNull(project); | |
// Act | |
var after = ScheduleEngine.CalculateSchedule(project); | |
// Assert |
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
[TestMethod] | |
public void ScheduleEngine_Basic_Test() | |
{ | |
// Arrange | |
var before = new Project() | |
{ | |
Start = DateTime.Parse("2020-06-01"), | |
Activities = new [] | |
{ | |
new Activity() |
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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:Models="clr-namespace:Models" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" x:Class="Views.Contacts" | |
Title="{Binding Title}"> | |
<StackLayout> | |
<SearchBar x:Name="SearchInput" TextChanged="SearchBar_TextChanged"></SearchBar> |
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
[XamlCompilation(XamlCompilationOptions.Compile)] | |
public partial class Contacts : ContentPage | |
{ | |
public IContactService ContactService => DependencyService.Get<IContactService>(); | |
public ILocalCacheService LocalCacheService => DependencyService.Get<ILocalCacheService>(); | |
public ObservableCollection<Contact> Items { get; set; } | |
public Contacts() | |
{ |
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
private static bool _columnEncryptionInitialized = false; | |
private static ClientCredential _clientCredential; | |
private static void InitializeColumnEncryption() | |
{ | |
_clientCredential = new ClientCredential("APP_ID", "APP_SECRET"); | |
var azureKeyVaultProvider = | |
new SqlColumnEncryptionAzureKeyVaultProvider(GetToken); |
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
import { Component, ViewChild } from '@angular/core'; | |
import { NgTerminal } from 'ng-terminal'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { | |
@ViewChild('theTerm', { static: true }) child: NgTerminal; |
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
<ng-terminal #theTerm></ng-terminal> |
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 IHostBuilder CreateHostBuilder(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => | |
webBuilder.ConfigureAppConfiguration((hostingContext, config) => | |
{ | |
Console.WriteLine("Hosting Environment = " + hostingContext.HostingEnvironment.EnvironmentName); | |
var settings = config.Build(); | |
Console.WriteLine(settings["ConnectionStrings:AppConfig"]); | |
config.AddAzureAppConfiguration(options => | |
options |