Brain Teaser: Update the above code such that that unit tests pass. Do not update the content of the unit tests (however you are allowed to switch off of xUnit if you like).
View App.xaml.cs
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 partial class App : Application | |
{ | |
[NotNull] | |
public static IServiceProvider? ServiceProvider { get; private set; } | |
[STAThread] | |
public static void Main(string[] args) | |
{ | |
using IHost host = CreateHostBuilder(args).Build(); | |
host.Start(); |
View ConstructorTests.cs
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Moq; | |
using Xunit; | |
namespace Namespace | |
{ | |
public interface IConstructorTest |
View IHttpCall.cs
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
namespace Example.HttpClient.Tests | |
{ | |
public interface IHttpCall | |
{ | |
int InvocationsCount { get; } | |
} | |
} |
View Program.cs
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; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace GC | |
{ | |
/* | |
In dotnet core, finalizer does not appear to be called on shutdown |
View Notes.md
Personal notes on presenting and streaming.
Before starting
- Turn off un-needed software. Especially things with notifications: Slack, Skype, Teams, etc.
- Turn on Focus Assist
- When sharing your desktop, consider sharing a secondary screen rather than the primary screen. Many apps will post notifications to the primary screen so this will help cut down on accidently sharing out notifications.
- Hide desktop icons
- Consider resolution/DPI. Remember that for streaming, people watching may be on lower resolutions; don't stream above 1080p.
- Hide task bar. Either set auto hide, or simply crop the shared section of your screen to omit it.
- Consider if desktop background is appropriate.
View UnitTests
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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
using System; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Threading.Tasks; | |
namespace CreateDelegate | |
{ | |
[TestClass] |
View BindableBehavior.cs
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 abstract class BindableBehavior<T> : Behavior<T> where T : BindableObject | |
{ | |
protected override void OnAttachedTo(T bindable) | |
{ | |
if (bindable != null) | |
{ | |
this.InheritsBindingContextFrom(bindable); | |
} | |
base.OnAttachedTo(bindable); | |
} |
View Person.cs
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 Person | |
{ | |
public string Name { get; set; } | |
} |
NewerOlder