473,804 Members | 3,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Finding "not used methods"

Hey

I have been givin the job the extend an asp.net c# application with and
extensive but very poor documented business layer. There are aprox 1200
methods like: FindAvailAmount , GetAllEmployee etc.

But as far as I can see many of the methods aint ever used. Is there a way
to traverse the layer and name methods that never called from any location
in the source code?

Looking forward to your suggestion
Anders
Nov 17 '05 #1
4 1556
Hi Anders,
if you are using Visual Studio then I would recomend a plugin called
ReSharper http://www.jetbrains.com/resharper/ it can be used for refactoring
and will highlight methods, variables, namespace imports that are not used
anywhere in the code. I find it very useful.

Hope that helps
Mark R Dawson

"Anders K. Jacobsen [DK]" wrote:
Hey

I have been givin the job the extend an asp.net c# application with and
extensive but very poor documented business layer. There are aprox 1200
methods like: FindAvailAmount , GetAllEmployee etc.

But as far as I can see many of the methods aint ever used. Is there a way
to traverse the layer and name methods that never called from any location
in the source code?

Looking forward to your suggestion
Anders

Nov 17 '05 #2

If I remember right, FxCop includes a check for uncalled methods - and
it's free :)

Mark R. Dawson wrote:
Hi Anders,
if you are using Visual Studio then I would recomend a plugin called
ReSharper http://www.jetbrains.com/resharper/ it can be used for refactoring
and will highlight methods, variables, namespace imports that are not used
anywhere in the code. I find it very useful.

Hope that helps
Mark R Dawson

"Anders K. Jacobsen [DK]" wrote:
Hey

I have been givin the job the extend an asp.net c# application with and
extensive but very poor documented business layer. There are aprox 1200
methods like: FindAvailAmount , GetAllEmployee etc.

But as far as I can see many of the methods aint ever used. Is there a way
to traverse the layer and name methods that never called from any location
in the source code?

Looking forward to your suggestion
Anders


Nov 17 '05 #3

"Larry Lard" <la*******@hotm ail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .

If I remember right, FxCop includes a check for uncalled methods - and
it's free :)


and always be careful of removing the *reported* unused methods if you have
any calling of methods via reflection!
Nov 17 '05 #4
> and always be careful of removing the *reported* unused methods if you
have any calling of methods via reflection!


Good point :)

Thanks for the suggestions. I´ll look into all of them.

Thanks!
Anders
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
7027
by: Noam Raphael | last post by:
Hello, I thought about a new Python feature. Please tell me what you think about it. Say you want to write a base class with some unimplemented methods, that subclasses must implement (or maybe even just declare an interface, with no methods implemented). Right now, you don't really have a way to do it. You can leave the methods with a "pass", or raise a NotImplementedError, but even in the best solution that I know of,
6
1879
by: Eitan | last post by:
Hello, I would like to know about the methods : post and get of ASP. What is the difference between them. Need some samples, and explanation, please. Thanks :)
235
11817
by: napi | last post by:
I think you would agree with me that a C compiler that directly produces Java Byte Code to be run on any JVM is something that is missing to software programmers so far. With such a tool one could stay with C and still be able to produce Java byte code for platform independent apps. Also, old programs (with some tweaking) could be re-compiled and ported to the JVM. We have been developing such a tool over the last 2 years and currently...
12
4136
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport) {
3
1782
by: rickeringill | last post by:
Hi comp.lang.javascript, I'm throwing this in for discussion. First up I don't claim to be any sort of authority on the ecmascript language spec - in fact I'm a relative newb to these more esoteric uses (abuses?) of the language. I've been working from the oft quoted resource http://www.crockford.com/javascript/private.html. During my first serious attempt at using the knowledge acquired from this page, I ran up against the problem...
0
900
by: Franck PEREZ | last post by:
All, My application deals with strings formatting. I have built-in methods but I also expect the user to add its methods in its own .py files (some sort of plugin methods, all user methods should be exposed in my application). Here is the structure I have thought of : formatting.py
3
18147
by: Bsr | last post by:
What is the difference between for the following methods. "GET", "HEAD", "PUT" or "POST". Ex:my $req =HTTP::Request->new(GET =>$url1); Bhuvan.
94
30363
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock Statement (C# Reference) statement to serialize access. " But when is it better to use "volatile" instead of "lock" ?
8
2711
by: ssecorp | last post by:
I first learned about OO from Java. I much prefer to program in Python though. However I am consufed about 2 things. 1. Why do I have to pass self into every method in a class? Since I am always doing why cant this be automated or abstracted away? Are the instances where I won't pass self? I imagine there is some tradeoff involved otherwise it would have been
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.