missing using directive

Explore, browse and analyze .NET assemblies

Moderators: Luke Jefferson, Clive Tong, nick.maidment

missing using directive

Postby alehandro » Tue Jan 25, 2011 4:37 pm

HI
for some reason Reflector does not include the required "using" for the HwndSourceHook type

example:

public bool m000141()
{
this.f000258 = new c00007c();
if (!this.f000258.m000022(new HwndSourceHook(this.m000058)))
{
return false;
}
.....

and here is the list of generated using:

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Threading;


the missed one is
using System.Windows.Interop;


2) similar issue for ThreadStart type
missed using is System.Threading
Thanks
alehandro
 
Posts: 35
Joined: Tue Nov 16, 2010 12:08 am

Postby Clive Tong » Wed Jan 26, 2011 10:14 am

Hi.

Do you have an example I can look at?

When I use the export functionality on the following example:
Code: Select all
            bool handled = false;
            System.Windows.Interop.HwndSourceHook foo = null;
            foo.Invoke(new IntPtr(10), 10, new IntPtr(10), new IntPtr(20), ref handled);

            ThreadStart start = null;
            start.Invoke();


I do get the following using statements

Code: Select all
    using System;
    using System.Threading;
    using System.Windows.Interop;


Thanks.
Clive Tong
 
Posts: 283
Joined: Thu Dec 04, 2008 5:42 pm

Postby alehandro » Thu Jan 27, 2011 1:56 pm

Hi,
here is the sample assembly
http://www.multiupload.com/ASYE2OUYYG
try to Export the sources, then compile (it is .NET 4.0 assembly)
you'll find a couple of missed using directives
alehandro
 
Posts: 35
Joined: Tue Nov 16, 2010 12:08 am

Postby Clive Tong » Thu Jan 27, 2011 5:27 pm

Thank You for the example. I've logged it as RP-954.
Clive Tong
 
Posts: 283
Joined: Thu Dec 04, 2008 5:42 pm


Return to .NET Reflector 7 EAP

Who is online

Users browsing this forum: No registered users and 1 guest