Coder Social home page Coder Social logo

linksplatform / collections Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 7.0 15.04 MB

LinksPlatform's Platform.Collections Class Library

Home Page: https://linksplatform.github.io/Collections

License: The Unlicense

C# 82.07% C++ 15.93% CMake 0.55% C 0.63% Shell 0.80%
linksplatform dotnet-standard dotnet-framework csharp nuget-package class-library

collections's Introduction

collections's People

Contributors

alfmla avatar codacy-badger avatar dependabot-preview[bot] avatar dependabot[bot] avatar eugene-katsevman avatar flakeed avatar freephoenix888 avatar hole-code avatar konard avatar namelessptr avatar nassipkali avatar uselessgoddess avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

collections's Issues

Rework Walkers in the C++ code to concepts instead of interfaces style

virtuals methods does not support template parameters
This is no good

template <Platform::Collections::System::Array TArray, typename TSegment>
requires
std::derived_from<TSegment, std::span<char>> &&
requires(TArray array, std::string string) {TArray(string.begin(), string.end());}
static void WalkAll(AllSegmentsWalkerBase<char, TArray, TSegment> walker, std::string string)
{
walker.WalkAll(TArray(string.begin(), string.end()));
}

protected: TSegment CreateSegment(TArray& elements, std::int32_t offset, std::int32_t length)

template <typename T, Platform::Collections::System::Array TArray, typename TSegment>
requires std::derived_from<TSegment, std::span<T>>
class DuplicateSegmentsWalkerBase<T, TArray, TSegment> : public AllSegmentsWalkerBase<T, TArray, TSegment>

You need to do this so that you do not need to statically set the type of the enumerated object
Since there is no need to save it, we should stick to the following style:

void WalkAll(IEnumerable auto) { ... }

Add comments on public classes and methods

Add ToArray without parameters

public static T[] ToArray<T>(this IList<T> list, Func<T, bool> predicate)

proposed code

public TLink[] ToArray(this IList<T> list)
{
    var array = new TLink[list.Count];
    list.CopyTo(array, 0);
    return array;
}

and use it here:

https://github.com/linksplatform/Data.Doublets/blob/93ad6046c5c2273623c7ff2b2264d59326b0e827/Link.cs#L73

and delete from here:

https://github.com/linksplatform/Data.Doublets/blob/93ad6046c5c2273623c7ff2b2264d59326b0e827/Link.cs#L77

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.