Code Monkey home page Code Monkey logo

extensions's Introduction

Quality Gate Status Reliability Rating Security Rating Maintainability Rating Vulnerabilities Bugs

Core validation

About the project

TryAtSoftware.Extensions is a repository containing many libraries with extension methods and utility components one can use to reduce repetitive code or simplify common tasks.

About us

Try At Software is a software development company based in Bulgaria. We are mainly using dotnet technologies (C#, ASP.NET Core, Entity Framework Core, etc.) and our main idea is to provide a set of tools that can simplify the majority of work a developer does on a daily basis.

Structure

This repository contains the source code of two libraries that are part of the TryAtSoftware.Extensions suite:

extensions's People

Contributors

tonytroeff avatar jivkovaviktoria avatar

Stargazers

Valentin Dimitroff avatar  avatar Rock avatar Victorio Nikolaev avatar Georgi Marokov avatar Zhecho Zhechev avatar  avatar  avatar

extensions's Issues

`ConstructObjectInitializer` cannot be used if the generic parameter `T` is a base type

Describe the bug
I have the following code:

public interface IEntity { }
public class Entity<T> : IEntity { }

var entityType = typeof(Entity<>).MakeGenericType(typeof(int));
var constructor = entityType.GetConstructor(Type.EmptyTypes);

var initializer = constructor!.ConstructObjectInitializer<IEntity>();

An exception will always be thrown saying that the constructor was obtained from a different type.

Expected behavior
I want the generated expression to be typed according to the known base type.

Environment (please complete the following information):

  • OS: Windows 11
  • .NET Version: .NET 7
  • Package Version: 1.1.2

Add a new project for DI extensions

We need to have some extension methods that can easily find and register within a DI container all components that are decorated with some attribute.

Implement `Bitmask`

Describe your idea
Implement a DS that should allow optimal manipulation over an long sequence of bits.

Additional context
This feature is required in order to proceed with further optimizations within TryAtSoftware.CleanTests.

Add issue template for documentation tasks

This is a house-keeping task that should allow us to clear out the process of creating issues related to modifying (or extending) the existing documentation resources.

Non-generic Members binder

I would like to use a non-generic version of the "Members binder" component so I can cache this property retrieval here:
image

Create a new DS called `Fluid dictionary`

This should be the polymorphic brother of the standard dictionary.

This is the interface we should implement:

public interface IFluidDictionary<TKey>
{
    bool Set<T>(TKey key, T value);
    bool TryGetValue<T>(TKey key, out T value);
    T GetValueOrDefault<T>(TKey key);
    T GetRequiredValue<T>(TKey key);
    IEnumerable<TKey> Keys { get; }
}

Add a component that can be used to easily "slice" an array

I need to access the last element of an array. With the other elements I want to execute another operation. However, this pattern may reoccur recursively and that means that we will have n partial copies of the original array in memory.
If we could "slice" it somehow, this would help us optimize the process a lot.

Add optional key selector to the Members binder

Currently members with the same name cannot co-exist. Imaging method overloads, property and a method with the same name, etc.

The key should be determined accordingly to the MemberInfo instance. Potentially an attribute's value may be used.

Add documentation for the `Bitmask` implementation

A new section within the documentation of TryAtSoftware.Extensions.Collections should be created. It must be dedicated to the Bitmask implementation and should contain information about its purpose, related use cases and examples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.