Questions tagged [language-ext]

Relating to the open-source C# functional framework: language-ext.

Language-ext github home page.

66 questions
0
votes
1 answer

How to build nested HashMap in C# using LanguageExt in a most-readable way?

In .NET / C# I have input data of type IEnumerable with T having some properties I want to use for lookups. How can I build a two-level (maybe three-level) lookup using LanguageExt without producing hard to read code like this: var items =…
stb
  • 772
  • 5
  • 15
0
votes
1 answer

C# - Joining two LanguageExt Either> on matching key

In the example below, I have two sets of objects that have matching keys. class Stuff { int Key1 { get; set; } ... other props } class OtherStuff { int Key2 { get; set; } ... other props } I would like to join two lists of these…
Steztric
  • 2,832
  • 2
  • 24
  • 43
0
votes
1 answer

languageext eitherasyn with aggegrate bind with validation

I am using lauthy language ext in c# here are 3 functions those will be called in form main function the aim is return aggregated results of commands.. or Error but it is complinign below when I pass y to ExecuteSingleHostCommands Error CS1503 …
userkk
  • 3
  • 2
0
votes
2 answers

Language-Ext, How to use applicatives in c#?

Hi I am building a sample of f# from https://fsharpforfunandprofit.com/posts/elevated-world-3/ in c#. My code is as below, public class CustomerId : NewType { public CustomerId(int id) : base(id) { } } public class…
0
votes
1 answer

Perform async action only when Option<> is Some

In a piece of code using language-ext library, I can perform an async action only when the Option<> intermediate result is actually filled: async Task> FindEntityAsync(string entityId) { Option entityOpt = await…
superjos
  • 12,189
  • 6
  • 89
  • 134
-2
votes
1 answer

In C#, using a loan pattern, TryAsync, and RestClient.ExecuteAsync(), how can I get the system to wait for the result of the second callout?

I'm currently refactoring a microservice which uses RestSharp's RestClient to call out to Personio, in order to use the latest version of RestSharp (v107), as well as to use ExecuteAsync instead of Execute. I have the following method: …
Brian Kessler
  • 2,187
  • 6
  • 28
  • 58
1 2 3 4
5