Search Wiki:

Get class functions by name


            CodeClass myClass;
 
            var myFunctions = myClass.GetFunctionsByName("MyFunction");

Get class public functions

            CodeClass myClass;
 
            var myPublicFunctions = myClass.GetFunctionsByVisibility(vsCMAccess.vsCMAccessPublic);
 

Get class virtual functions

            CodeClass myClass;
 
            var myVirtualFunctions = myClass.GetFunctionsByModifier(FunctionModifier.Virtual);

Get functions attributes with a name starting with...

            CodeFunction myFunction;
 
            var myAttributes = 
                myFunction.GetAttributes()
                .Where(
                    attribute => attribute.Name.StartsWith("BrowsableAttribute", StringComparison.OrdinalIgnoreCase));

Get interface properties with attributes

            CodeInterface myInterface;
 
            myInterface.GetProperties()
                .Where(property => property.Attributes.Count >0);

More to come..
Last edited Mar 28 2008 at 10:08 PM  by pablogaliano, version 3
Updating...
Page view tracker