خروجی‌های Covariant به زودی در NET runtime.
200, OK
https://github.com/dotnet/runtime/pull/35308#issuecomment-624043389 icon

Work in progress to add support for covariant return types to the .NET runtime. Soon we'll be able to override a virtual method returning `object` with a method returning `string`. Because of how array variance works, weird things might be possible in IL. 

class Base
{
    public virtual IntPtr[] Fun() => null;
}

// This is obvious pseude-code because C# won't let us introduce methods differing
// in return type. C# also requires to be explicit about "virtual" and "override".
// But IL... not so much.
class Derived : Base
{
    // overrides Base.Fun on 32bit platforms.
    public override uint[] Fun() => null;

    // overrides Base.Fun on 64bit platforms.
    public override ulong[] Fun() => null;
}
خروجی‌های Covariant به زودی در NET runtime.
v1.21.18 افزونه‌ی #C مخصوص Visual Studio Code منتشر شد
301, MovedPermanently
https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.21.18 icon
v1.21.18 افزونه‌ی #C مخصوص Visual Studio Code منتشر شد
Mock کردن HttpClient برای تست نویسی توسط کتابخانه MockHttp
200, OK
https://github.com/richardszalay/mockhttp icon

MockHttp is a testing layer for Microsoft's HttpClient library. It allows stubbed responses to be configured for matched HTTP requests and can be used to test your application's service layer. 

var mockHttp = new MockHttpMessageHandler();

// Setup a respond for the user api (including a wildcard in the URL)
mockHttp.When("http://localhost/api/user/*")
        .Respond("application/json", "{'name' : 'Test McGee'}"); // Respond with JSON

// Inject the handler or client into your application code
var client = mockHttp.ToHttpClient();

var response = await client.GetAsync("http://localhost/api/user/1234");
// or without async: var response = client.GetAsync("http://localhost/api/user/1234").Result;

var json = await response.Content.ReadAsStringAsync();

// No network connection required
Console.Write(json); // {'name' : 'Test McGee'}


Mock کردن HttpClient برای تست نویسی توسط کتابخانه MockHttp