Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
MethodDefinition
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
aixeiger  
View profile  
 More options Oct 4 2012, 7:41 pm
From: aixeiger <drakgeng...@gmail.com>
Date: Thu, 4 Oct 2012 16:41:35 -0700 (PDT)
Local: Thurs, Oct 4 2012 7:41 pm
Subject: MethodDefinition

Hi!
here's my trouble when a try to read the methods in my class,  i do foreach
(MethodDefinition met in type.Methods) but this don't show me the methods
in my classes why? and that class  have one method, there are a other way
to get the methods inside in a class?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jb Evain  
View profile  
 More options Oct 7 2012, 2:00 pm
From: Jb Evain <jbev...@gmail.com>
Date: Sun, 7 Oct 2012 20:00:00 +0200
Subject: Re: [mono-cecil] MethodDefinition
Hi,

I suspect there's an issue with your code.

Maybe you could post it here, to figure out what's wrong?

Jb

On Oct 5, 2012, at 1:41 AM, aixeiger wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aixeiger  
View profile  
 More options Oct 18 2012, 7:21 pm
From: aixeiger <drakgeng...@gmail.com>
Date: Thu, 18 Oct 2012 16:21:32 -0700 (PDT)
Local: Thurs, Oct 18 2012 7:21 pm
Subject: Re: MethodDefinition

this is the code that i use for go through the methods

AssemblyDefinition asem = AssemblyFactory.GetAssembly(args[0]);
foreach (TypeDefinition tipo in asem.MainModule.Types)
{
    foreach (MethodDefinition met in tipo.Methods)
    {
           System.Console.WriteLine(met.Name);
    }
    foreach(PropertyDefinition pro in tipo.Properties)
    {
           System.Console.WriteLine(pro.Name);
    }
    foreach (FieldDefinition fie in tipo.Fields)
    {
            System.Console.WriteLine(fie.Name);
     }
            System.Console.WriteLine(tipo.FullName);
                    }

then when i run the application i get this

<Module>
Dispose
InitializeComponent
button1_Click
button2_Click
button3_Click
button4_Click
components
label1
button1
pictureBox1
button2
button3
button4
texta1
label2
pictureBox2
se
prop
Car.Form1
Dispose
InitializeComponent
button1_Click
components
label1
textBox1
button1
button2
button3
Car.Form2
get_Default
Default
defaultInstance
Car.Properties.Settings
carsettings
Car.Propiedades
get_ResourceManager
get_Culture
set_Culture
ResourceManager
Culture
resourceMan
resourceCulture
Car.Properties.Resources
Main
Car.Program
Car.Simulacion

that's are all the elements to my application but in the last two just show
the name of the classes and my ask is how i can go through the methods
inside the classes and propierties and to the access modifiers and the
other things to this classes have

if you can help me please!

thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vidisha Ghosh  
View profile  
 More options Oct 18 2012, 7:37 pm
From: Vidisha Ghosh <imvidi...@gmail.com>
Date: Thu, 18 Oct 2012 17:37:20 -0600
Local: Thurs, Oct 18 2012 7:37 pm
Subject: Re: [mono-cecil] Re: MethodDefinition

You can traverse the nested types like this:

if(tipo.HasNestedTypes)   // where tipo is your type from the main foreach
loop
{

foreach (TypeDefinition nestedType in tipo.NestedTypes)
{
        //do what you want to here..

--
Vidisha Ghosh

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aixeiger  
View profile  
 More options Oct 18 2012, 8:35 pm
From: aixeiger <drakgeng...@gmail.com>
Date: Thu, 18 Oct 2012 17:35:33 -0700 (PDT)
Local: Thurs, Oct 18 2012 8:35 pm
Subject: Re: MethodDefinition

and i can get the name? for example:

namespace Car
{
    class Propiedades
    {
        public StringBuilder carsettings(int n)
        {
           //ahhh
        }
        public void carjobs()
        {
            // somethig
        }
    }

}

who i get the name of the namespace, the name of the class, and the name of
the methods?

I apologize if not properly express!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
deedee  
View profile  
 More options Oct 22 2012, 12:31 pm
From: deedee <imvidi...@gmail.com>
Date: Mon, 22 Oct 2012 09:31:23 -0700 (PDT)
Local: Mon, Oct 22 2012 12:31 pm
Subject: Re: MethodDefinition

There is a Namespace and a FullName property associated with the type. You
can fetch the value from there.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aixeiger  
View profile  
 More options Oct 24 2012, 12:18 pm
From: aixeiger <drakgeng...@gmail.com>
Date: Wed, 24 Oct 2012 09:18:19 -0700 (PDT)
Local: Wed, Oct 24 2012 12:18 pm
Subject: Re: MethodDefinition

Okay! then when i hace the name of a method how i can modified the metada,
change the name for example to my method run change to opc! with mono cecil
this can be do?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aixeiger  
View profile  
 More options Oct 25 2012, 9:12 pm
From: aixeiger <drakgeng...@gmail.com>
Date: Thu, 25 Oct 2012 18:12:51 -0700 (PDT)
Local: Thurs, Oct 25 2012 9:12 pm
Subject: Re: MethodDefinition

thanks i find my mistake! if someone like add me to the skype to talk to
mono cecil and programming c#! is :aixeiger thanks! cheers!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »