¡@

Home 

c# Programming Glossary: refactor

Refactoring code to avoid anti-pattern

http://stackoverflow.com/questions/11224170/refactoring-code-to-avoid-anti-pattern

domain object and is made as an interface member. How to refactor it so that repository will not be an interface member The domain..

Moq: unit testing a method relying on HttpContext

http://stackoverflow.com/questions/1214178/moq-unit-testing-a-method-relying-on-httpcontext

pipeline. In order to test this with Moq you need to refactor your GetSecurityContextUserName method to use dependency injection..

Best Practices of Test Driven Development Using C# and RhinoMocks [closed]

http://stackoverflow.com/questions/124210/best-practices-of-test-driven-development-using-c-sharp-and-rhinomocks

Refer back to previous point. Avoid the temptation to refactor duplication out of your unit tests into abstract base classes.. the clarity of each individual test is more important than refactoring out duplication. Implement Continuous Integration. Check..

How do you find out when you've been loaded via XML Serialization?

http://stackoverflow.com/questions/1266547/how-do-you-find-out-when-youve-been-loaded-via-xml-serialization

question Hmmm... it's still not pretty but you could refactor your deserialization logic into a dedicated class which could..

What are the pros and cons to keeping SQL in Stored Procs versus Code

http://stackoverflow.com/questions/15142/what-are-the-pros-and-cons-to-keeping-sql-in-stored-procs-versus-code

is why storedprocs are a bad thing. It's much easier to refactor and decompose break into smaller parts code into functions than..

Complex UI inside ListBoxItem

http://stackoverflow.com/questions/15532639/complex-ui-inside-listboxitem

wanted to completely redefine the View I wouldn't have to refactor the entire application 2 Does winforms support databinding in.. wanted to completely redefine the View I wouldn't have to refactor the entire application In the past I've used the MVP model view..

How to avoid Dependency Injection constructor madness?

http://stackoverflow.com/questions/2420193/how-to-avoid-dependency-injection-constructor-madness

glaringly obvious. When that happens it's time to refactor to Aggregate Services . In short create a new more coarse grained..

Find unused code

http://stackoverflow.com/questions/245963/find-unused-code

unused code I have to refactor a large C# application and I found a lot of functions that are.. code so I can remove all the unused functions c# .net refactoring share improve this question Yes ReSharper does this. Right..

How do I iterate over the properties of an anonymous object in C#?

http://stackoverflow.com/questions/2594527/how-do-i-iterate-over-the-properties-of-an-anonymous-object-in-c

This will be done in many of my unit tests I'm using it to refactor away a lot of junk in the setup so performance is to some extent..

Mutating the expression tree of a predicate to target another type

http://stackoverflow.com/questions/2797261/mutating-the-expression-tree-of-a-predicate-to-target-another-type

save that instead. The problem surfaced when attempting to refactor this database access layer. The Problem I want to add methods..

Very slow compile times on Visual Studio 2005

http://stackoverflow.com/questions/55517/very-slow-compile-times-on-visual-studio-2005

the separation of concerns but is a good opportunity to refactor away some dead wood . We are also looking at having multiple..

How to switch between “possible” type of an object? [duplicate]

http://stackoverflow.com/questions/5947343/how-to-switch-between-possible-type-of-an-object

obj is blah blah blah This method is just ugly. I want to refactor it but I don't know a technique to iterate over possible types.. to iterate over possible types that obj can be. How can I refactor this Thank you. c# .net types switch statement share improve.. statement share improve this question You can also refactor this with interfaces public interface IHasUri public Uri GetUri..

Why is this switch on type case considered confusing?

http://stackoverflow.com/questions/6304815/why-is-this-switch-on-type-case-considered-confusing

type case considered confusing I was looking for a way to refactor and simplify one function where I have to do data sorting depending..

Should C# methods that *can* be static be static? [closed]

http://stackoverflow.com/questions/731763/should-c-sharp-methods-that-can-be-static-be-static

of on the fence. Imagine you have a long method that you refactor a few lines out of. The new method probably takes a few local.. methods static if they are must be static methods. The refactoring from non static to static is relatively easy just add a keyword.. outside of an instance then you can. However the inverse refactoring turning a can be static into a instance method is MUCH more..

C# LINQ to SQL: Refactoring this Generic GetByID method

http://stackoverflow.com/questions/735140/c-sharp-linq-to-sql-refactoring-this-generic-getbyid-method

have to be enumerated and converted to a List . How can I refactor this method to avoid a ToList on the whole table Update The..

WCF strange behaviour

http://stackoverflow.com/questions/11466537/wcf-strange-behaviour

DreamServices NOTE You can use the Rename command on the Refactor menu to change the interface name IService1 in both code and..

Unit Testing - Is it bad form to have unit test calling other unit tests

http://stackoverflow.com/questions/1368900/unit-testing-is-it-bad-form-to-have-unit-test-calling-other-unit-tests

visual studio unit testing share improve this question Refactor the setup to another method and call that method from both tests...

Customizing Visual Studio

http://stackoverflow.com/questions/41908/customizing-visual-studio

49 Academic 199 Personal 349 Commercial CodeRush with Refactor Pro 249 c# asp.net winforms visual studio share improve this..

Do you use 'this' in front of instance variables?

http://stackoverflow.com/questions/762025/do-you-use-this-in-front-of-instance-variables

What is your favorite use of Resharper? [closed]

http://stackoverflow.com/questions/76499/what-is-your-favorite-use-of-resharper

Base Alt Home in VS bindings Ctrl Alt B Goto Inheritor Refactoring features Ctrl Shift R Refactor This same F2 Rename Ctrl R.. Alt B Goto Inheritor Refactoring features Ctrl Shift R Refactor This same F2 Rename Ctrl R R Ctrl F6 Change Signature Extract..

Extracting Property Names For Reflection, with Intellisense and Compile-Time Checking

http://stackoverflow.com/questions/795208/extracting-property-names-for-reflection-with-intellisense-and-compile-time-che

name on the given object. Additionally things like Refactor and Find All References miss out on this sort of reference resulting..