Skip to content

Instantly share code, notes, and snippets.

View ierhalim's full-sized avatar

İlker ERHALIM ierhalim

  • Hugo Boss
  • Turkey/İzmir
View GitHub Profile
using System;
using System.Linq;
using System.Runtime.Loader;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ServiceAdapter.ExternalAccess;
namespace ServiceAdapter.ExternalAccess.BlumeCorparation
{
public class ExampleService : IExampleService
{
public async Task<IEnumerable<ExampleOutputModel>> Get()
{
// TODO: BlumeCorpartion'ın sağladığı servis verisini ExampleOutputModel'e mapleyip döndür.
}
}
}
public interface IExampleService
{
Task<IEnumerable<ExampleOutputModel>> Get();
}
public class Startup : IExternalStartup
{
public void RegisterServices(IServiceCollection serviceCollection)
{
serviceCollection.AddScoped<IExampleService, ExampleService>();
}
}
"AdapterConfig": {
"ServiceAssembly":"ServiceAdapter.ExternalServices.Default.dll"
}
public class AdapterConfig
{
public string ServiceAssembly { get; set; }
}
public class ExampleImporter
{
private readonly IExampleService _exampleService;
public ExampleImporter(IExampleService exampleService)
{
_exampleService = exampleService;
}
public async Task Import()
{
public interface IImportEngine<TSource, TTarget> where TSource : ExternalSourceModel
where TTarget : IIdentityEntity
{
Task Import();
}
public interface IInserter<TSource> where TSource : ExternalSourceModel
{
void Insert(TSource source);
}
@ierhalim
ierhalim / Program.cs
Last active December 26, 2020 23:25
Y1O1 C# Paralel programlama
using System;
using System.Threading.Tasks;
namespace CreatingAndStartingTask
{
class Program
{
static void DoWork(string message)
{
for (int i = 0; i < 1000; i++)