protected virtual ISynchChannel <T1, T2 /*, ItemMatch<T1, T2>*/> DoCreate <TId>( IChannelConfiguration <T1, T2, TId, ItemMatch <T1, T2> > config, IPlumber <T1, T2, TId> plumber) where TId : IEquatable <TId> { return(new OneWayPullChannel <T1, T2, TId, ItemMatch <T1, T2> >(config, plumber, ListProvider1, ListProvider2)); }
public static void AddViewsEngine(this IPlumber plumber, Action <IViewsEngineSettings> viewsEngineSettings) { var settings = new BaseViewsEngineSettings(); viewsEngineSettings.Invoke(settings); AddDependencies(plumber.Services, settings); }
public ISynchChannel <T1, T2 /*, ItemMatch<T1, T2>*/> Create <TId>( IChannelConfiguration <T1, T2, TId, ItemMatch <T1, T2> > config, IPlumber <T1, T2, TId> plumber) where TId : IEquatable <TId> { var channel = DoCreate(config, plumber); foreach (var channelCreationObserver in CreationObservers) { channelCreationObserver.Created(channel); } return(channel); }
public static void AddDatabase <T>(this IPlumber plumber, string connectionString = null, DatabaseType databaseType = DatabaseType.MsSql, string migrationsAssembly = null) where T : PipeworksContext <T> { if (migrationsAssembly == null) { migrationsAssembly = typeof(T).Assembly.FullName; } switch (databaseType) { case DatabaseType.MsSql: { plumber.Services.AddDbContext <T>(options => options.UseSqlServer( connectionString ?? plumber.ConnectionString, b => b.MigrationsAssembly(migrationsAssembly))); break; } } }
public OneWayPullChannel( [NotNull] ISynchSourcesConfig <T1, T2, TId> channelConfig, [NotNull] IPlumber <T1, T2, TId> plumber, [NotNull] Func <Task <IEnumerable <T1> > > t1DataSource, [NotNull] Func <Task <IEnumerable <T2> > > t2DataSource) { if (plumber == null) { throw new ArgumentNullException(nameof(plumber)); } if (t1DataSource == null) { throw new ArgumentNullException(nameof(t1DataSource)); } if (t2DataSource == null) { throw new ArgumentNullException(nameof(t2DataSource)); } ChannelConfig = channelConfig; Plumber = plumber; _t1DataSource = t1DataSource; _t2DataSource = t2DataSource; }
public static void AddHttpCommunication(this IPlumber plumber) { }
public void Configure <T1, T2, TId, TSynch>(IPlumber <T1, T2, TId> bla) where TId : IEquatable <TId> { // Set the preprocessor? // Set the rules? }
internal static void Apply(this IPlumber plumber, Action <IPlumber> plumberAction) { plumberAction.Invoke(plumber); }
public static void AddSettings(this IPlumber plumber) { plumber.AddDatabase <SiteSettingsContext>(); }