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).
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; } | |
} |
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); | |
} |
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] |
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 |
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
/* | |
WARNING: This MultiBinding implementation only works when it is directly applied to its target property. | |
It will fail if used inside of a setter (such is the case when used within a trigger or style). | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.Runtime.CompilerServices; |
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; } | |
} | |
} |
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 |
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(); |