Coder Social home page Coder Social logo

massivedynamicproxygenerator's People

Contributors

burgyn avatar dependabot[bot] avatar harrison314 avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

yyl-20020115

massivedynamicproxygenerator's Issues

Unable to use this assembly because it is not strong name signed

All our projects generate strong name signed assemblies and strong name signed assemblies cannot reference non-strong name signed ones.

CSC : warning CS8002: Referenced assembly 'MassiveDynamicProxyGenerator, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

Would it be possible to update this project and add the strong name signing?

Add to MassiveDynamicProxyGenerator interceptor to mock return values

Add to MassiveDynamicProxyGenerator interceptor to mock return values. With configure return values types, default types or implicit instance of types and configure behoviar.

Configuration:

  • Dictionary type to type (interface to concrete type)
  • Using factory pattern
  • Behoviar - if no match type in dictionary and factory returns null then interceptor return default value or throw exception

Add method for IInvocation to call method on another context

Add method for IInvocation to call method on another context:

interface IExample
{
   int Call(int x);
}

class ContextutalExample :IExample, IDisposable
{
    public int Call(int x)
    {
    return x+1;
    }
    public void Dispose()
    {
    }
}

ProxyGenerator generator = new ProxyGenerator();
InterceptorAdapter adapter = new InterceptorAdapter(invocation => {
  using(ContextutalExample instance = new ContextutalExample())
  {
    invocation.Process(instance);
  }
});

IExample proxy = generator.GenerateProxy<IExample>(adapter);

Task adapter.

Create Task adapter for inteception and invocation. Permitting use it async/await.

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.