Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am sfmskywalker on github.
  • I am sipke (https://keybase.io/sipke) on keybase.
  • I have a public key ASDL-AI4LIQ7bBa2xip4w9myhW1oXRfEDl_EgQ5aWQozTgo

To claim this, I am signing this object:

View UILabeledPickerView.cs
[Register(nameof(UILabeledPickerView))]
public class UILabeledPickerView : UIPickerView
{
public UILabeledPickerView(IntPtr handle) : base(handle)
{
}
private IDictionary<int, string> mLabelsDictionary = new Dictionary<int, string>();
@sfmskywalker
sfmskywalker / Startup.cs
Last active Jun 25, 2018
Root Startup file
View Startup.cs
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace MultiTenantApp
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
@sfmskywalker
sfmskywalker / tenants.json
Last active Jun 27, 2018
Sample tenants.json
View tenants.json
{
"CustomerA": {
"State": "Running",
"RequestUrlHost": null,
"RequestUrlPrefix": "customer-a",
"CustomSetting": "Custom setting for Customer A",
"Features": [ "RemoteIp" ]
},
"CustomerB": {
"State": "Running",
View IMessageProvider.cs
using System.Threading.Tasks;
namespace MultiTenantApp
{
public interface IMessageProvider
{
Task<string> GetMessageAsync();
}
}
@sfmskywalker
sfmskywalker / Startup.cs
Created Jun 25, 2018
Startup class for the TimeOfDay feature
View Startup.cs
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Modules;
[assembly: OrchardCore.Modules.Manifest.Feature(
Id = "TimeOfDay",
Name = "TimeOfDay"
)]
namespace MultiTenantApp.Features.TimeOfDay
{
View TimeOfDayMessageProvider.cs
using System.Threading.Tasks;
using OrchardCore.Modules;
namespace MultiTenantApp.Features.TimeOfDay
{
public class TimeOfDayMessageProvider : IMessageProvider
{
private readonly IClock _clock;
public TimeOfDayMessageProvider(IClock clock)
@sfmskywalker
sfmskywalker / Startup.cs
Created Jun 25, 2018
The Startup class for the RemoteIp feature
View Startup.cs
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Modules;
[assembly: OrchardCore.Modules.Manifest.Feature(
Id = "RemoteIp",
Name = "RemoteIp"
)]
namespace MultiTenantApp.Features.RemoteIp
{
View RemoteIpMessageProvider.cs
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace MultiTenantApp.Features.RemoteIp
{
public class RemoteIpMessageProvider : IMessageProvider
{
private readonly IHttpContextAccessor _httpContextAccessor;
public RemoteIpMessageProvider(IHttpContextAccessor httpContextAccessor)
@sfmskywalker
sfmskywalker / Startup.cs
Created Jun 25, 2018
Complete Startup class
View Startup.cs
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace MultiTenantApp
{
public class Startup
You can’t perform that action at this time.