Giter Site home page Giter Site logo

portable? about splat HOT 5 CLOSED

reactiveui avatar reactiveui commented on May 5, 2024
portable?

from splat.

Comments (5)

tofutim avatar tofutim commented on May 5, 2024

If I check SL5 in Splat-Portable, there are two types of errors:

Error 8 'Splat.ReflectionStubs.GetMethod(System.Type, string, System.Type[], Splat.BindingFlags)' is a 'method', which is not valid in the given context D:\Loqu8\Projects\splat\Splat\ModeDetector.cs 70 88 Splat-Portable

Error 1 'System.Type' does not contain a definition for 'GetTypeInfo' and no extension method 'GetTypeInfo' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?) D:\Loqu8\Projects\splat\Splat\ReflectionStubs.cs 23 27 Splat-Portable

from splat.

tofutim avatar tofutim commented on May 5, 2024

I think for the first error (Error 8)

    cachedInDesignModeResult = (bool)type.GetProperty("DesignModeEnabled").GetMethod.Invoke(null, null);

can be replaced with

    var method = type.GetProperty("DesignModeEnabled").GetGetMethod();
    cachedInDesignModeResult = (bool)method.Invoke(null, null);

from splat.

tofutim avatar tofutim commented on May 5, 2024

For the second error, would this work?

    public static FieldInfo GetField(this Type This, string name, BindingFlags flags = default(BindingFlags))
    {            
        //var ti = This.GetTypeInfo();            
        //var ret = ti.GetDeclaredField(name);
        //if (ret != null || !flags.HasFlag(BindingFlags.FlattenHierarchy) || ti.BaseType == null) return ret;

        //return ti.BaseType.GetField(name, flags);

        var ret = This.GetField(name);
        if (ret != null || !flags.HasFlag(BindingFlags.FlattenHierarchy) || This.BaseType == null) return ret;

        return This.BaseType.GetField(name, flags);
    }

from splat.

tofutim avatar tofutim commented on May 5, 2024

Never mind that, I think I'm just being embarrassingly circularly hopeful. ;P

If you do find a way to make SL5 work, it would be appreciated, but perhaps the reflection does not allow it.

from splat.

anaisbetts avatar anaisbetts commented on May 5, 2024

Splat is .NET 4.5 and higher, which doesn't include Silverlight. Sorry!

from splat.

Related Issues (20)

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.