Skip to content

Instantly share code, notes, and snippets.

View sajidmohammed88's full-sized avatar
🎯
Focusing

Mohammed Sajid sajidmohammed88

🎯
Focusing
View GitHub Profile
@sajidmohammed88
sajidmohammed88 / 1 - Encryption-Decryption-boucy-castle-C#.md
Last active July 7, 2023 06:13
Encryption/Decryption by BouncyCastle nuget for .NET projects.
@sajidmohammed88
sajidmohammed88 / BitBucket API Cloud-c#.md
Last active September 6, 2022 11:21
Get repos details from API cloud bitbucket.
@sajidmohammed88
sajidmohammed88 / DI WPF-C#.md
Last active April 13, 2024 20:40
Dependency injection in WPF project with .net core

Dependency injection in WPF project with .net core

Delete StartupUri="MainWindow.xaml" from App.xaml
Install packages :
Microsoft.Extensions.Configuration.Json
Microsoft.Extensions.DependencyInjection
Microsoft.Extensions.Options.ConfigurationExtensions
Add the file appsettings.json in the root of the project to use it for configuration.
@sajidmohammed88
sajidmohammed88 / TaskParallelLibrary-C#.md
Last active September 26, 2021 21:47
Task Parallel Library(TPL) : Adding parallelism and concurrency to program.

Custom Task parallel library

Method that implement parellelism

public static class TaskParallelLibrary
{
    public static async Task<IEnumerable<TResult>[]> ProcessListWithParallelismAsync<TSource, TResult>(
        this IEnumerable<TSource> source,
        Func<TSource, Task<IEnumerable<TResult>>> workItem, 
        int maxDegreeOfParallelism)
    {