Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Rhys Stubbs rhysstubbs

🎯
Focusing
View GitHub Profile
View interface-example.cs
namespace Example.Storage
{
public class Example
{
protected readonly IFileUploadService UploadService;
public Example(IFileUploadService uploadService)
{
this.UploadService = uploadService;
}
@rhysstubbs
rhysstubbs / no-interface-example.cs
Last active Mar 7, 2020
No Interface implementation
View no-interface-example.cs
namespace Example.Storage
{
public class ExampleWithoutInterface
{
protected readonly IHostEnvironment Env;
public ExampleWithoutInterface(IHostEnvironment env)
{
this.Env = env;
}
@rhysstubbs
rhysstubbs / InterfaceExample.cs
Last active Mar 2, 2020
Interface Example in C#
View InterfaceExample.cs
using System.IO;
using System.Threading.Tasks;
using Example.Storage.Responses;
namespace Example.Storage.Interfaces
{
public interface IFileUploadService
{
Task<UploadResult> UploadAsync(Stream stream, string filename, string path = null);