Giter Club home page Giter Club logo

thinktecture.runtime.extensions's People

Contributors

dependabot[bot] avatar pawelgerr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fredatgithub

thinktecture.runtime.extensions's Issues

Remove explicit system.text.json dependency

Is your feature request related to a problem? Please describe.
I want to minimise dependencies in my project by utilising framework dependencies wherever possible

Describe the solution you'd like
I want the package to not have an explicit dependency on System.Text.Json as it can be provided by the framework.

Describe alternatives you've considered
Accept the additional dependency

Additional context
n/a

SmartEnum causes error

Hi Pawel,

using updated version now causes this error:

'IEnumerable' does not contain a definition for 'ToList' and no accessible extension method 'ToList' accepting a first argument of type 'MySmartEnum' could be found (are you missing a using directive or an assembly reference?)

using Thinktecture;

namespace MyNamespace;

public partial class MySmartEnum : IEnum<string>
{
   public static readonly MySmartEnum MyItem = new("MyItem");
}

See MyNamespace.MySmartEnum.g.cs:

/* file: MyNamespace.MySmartEnum.g.cs */

/// <summary>
/// Gets all valid items.
/// </summary>
public static global::System.Collections.Generic.IReadOnlyList<global::MyNamespace.MySmartEnum> Items => _items ??= ItemsLookup.Values.ToList().AsReadOnly();

Greetings,
David

SmartEnum with static readonly field named System causes error

Hi Pawel,

implementing your SmartEnum with static readonly field named System causes error:

'MySmartEnum' does not contain a definition for 'StringComparer' and no accessible extension method 'StringComparer' accepting a first argument of type 'MySmartEnum' could be found (are you missing a using directive or an assembly reference?)

using Thinktecture;

namespace MyNamespace;

public partial class MySmartEnum : IEnum<string>
{
   public static readonly MySmartEnum System = new("System");
   public static readonly MySmartEnum User = new("User");
}

In the generated source file MySmartEnum_Generated.cs arises a conflict between System.StringComparer and the field named System.

I am using Thinktecture.Runtime.Extensions v4.0.1.

Best regards,
David

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.