Giter VIP home page Giter VIP logo

factory's People

Contributors

ashleydavis avatar rorydungan 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

factory's Issues

Add Factory.Create<T>()

Sometimes we want to create a class without an interface so that its dependencies can be resolved. Currently there are a few ways to do this but none is ideal:

// Factory.Create(Type) returns object, so needs to be casted to the correct type
var newObj = (SomeObject)Factory.Create(typeof(SomeObject));

// We can also use the string name, but this can cause issues with refactoring later
// This is less of an issue in C#6 because of 'nameof', but that isn't available in C# 4
var newObj = Factory.Create<SomeObject>("SomeObject");

// Creating from interface works with no arguments, but means we need to implement 
// an interface
var newObj = Factory.CreateInterface<ISomeObject>();

In theory, this would work and be nicer to write, but does not exist in the current version of the library:

var newObj = Factory.Create<SomeObject>();

No license

Working out stuff for releasing my project that uses this library and I realised it doesn't specify a license anywhere! I'm assuming MIT would be most appropriate because that's what the rest of RSG's open source code uses?

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.