Decompilation error

2 posts, 1 answers
  1. Jesper Krejberg Petersen
    Jesper Krejberg Petersen avatar
    70 posts
    Member since:
    Dec 2006

    Posted 23 Oct 2011 Link to this post

    I have a method like this:

     

    public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
    {
        switch (resourceType)
        {
            case "Barn":
                return this.GetChildren();
     
            case "Hjem":
                return this.GetHomes();
     
            case "Kontakt":
                return this.GetContacts();
     
            case "Privat":
                return this.GetVisibility();
     
            default:
                throw new InvalidOperationException("Unknown resource type: " + resourceType);
        }
    }

    In JustDecompile 2011.2.1017.4 this becomes:

    public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
    {
        string str = resourceType;
        if (str != null)
        {
            if ((str == "Barn" || str != "Hjem") && str == "Kontakt" || str != "Privat")
            {
                return this.GetChildren();
                return this.GetHomes();
                return this.GetContacts();
            }
            return this.GetVisibility();
        }
        throw new InvalidOperationException(string.Concat("Unknown resource type: ", resourceType));
    }


    Cheers /Jesper
  2. Answer
    Nikolay G Rusev
    Admin
    Nikolay G Rusev avatar
    44 posts

    Posted 27 Oct 2011 Link to this post

    Hello Jasper,

     Thank you for the feedback. We are aware of this problem and we are working on it, so it will definitely be fixed in a future release. Please, stay tuned and update regularly.

    Greetings,
    Nikolay G Rusev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top