This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IExampleService | |
{ | |
Task<IEnumerable<ExampleOutputModel>> Get(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup : IExternalStartup | |
{ | |
public void RegisterServices(IServiceCollection serviceCollection) | |
{ | |
serviceCollection.AddScoped<IExampleService, ExampleService>(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"AdapterConfig": { | |
"ServiceAssembly":"ServiceAdapter.ExternalServices.Default.dll" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AdapterConfig | |
{ | |
public string ServiceAssembly { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleImporter | |
{ | |
private readonly IExampleService _exampleService; | |
public ExampleImporter(IExampleService exampleService) | |
{ | |
_exampleService = exampleService; | |
} | |
public async Task Import() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IImportEngine<TSource, TTarget> where TSource : ExternalSourceModel | |
where TTarget : IIdentityEntity | |
{ | |
Task Import(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IInserter<TSource> where TSource : ExternalSourceModel | |
{ | |
void Insert(TSource source); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
namespace CreatingAndStartingTask | |
{ | |
class Program | |
{ | |
static void DoWork(string message) | |
{ | |
for (int i = 0; i < 1000; i++) |
OlderNewer