Skip to content

Instantly share code, notes, and snippets.

View rhysstubbs's full-sized avatar
🎯
Focusing

Rhys Stubbs rhysstubbs

🎯
Focusing
View GitHub Profile
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 March 7, 2020 20:40
No Interface implementation
namespace Example.Storage
{
public class ExampleWithoutInterface
{
protected readonly IHostEnvironment Env;
public ExampleWithoutInterface(IHostEnvironment env)
{
this.Env = env;
}
@rhysstubbs
rhysstubbs / InterfaceExample.cs
Last active March 2, 2020 14:15
Interface Example in C#
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);