yoavsion

Stories submitted by yoavsion

A generic Dispenser class(sharpregion.com)

submitted by yoavsionyoavsion(345) 4 years ago

Feeling ashamed for keeping your clients waiting until your code finally constructs your heavy classes/forms? This utility instantiates objects in a background thread and aspires to always be "full" to the capacity requested. Useful in cases the object being constructed uses many resources and is consumed frequently. read more...

add a comment |category: |Views: 12

tags: another

Give back to your testing framework(sharpregion.com)

submitted by yoavsionyoavsion(345) 4 years, 1 month ago

Can there be code reuse in testing classes? Is code coverage the only measurement we have for test efficiency? Should our testing framework test design and meta-code as well as functionality? Use this test classes base-class to test some things you probably haven't tested before. read more...

add a comment |category: |Views: 5

tags: another

Searching for derived types in an assembly(sharpregion.com)

submitted by yoavsionyoavsion(345) 4 years, 1 month ago

Sometimes we need to find all classes or interfaces that derive a certain Type. There are several possible scenarios for this kind of search - For instance, if we are trying to load a plug-in assembly at runtime and wish to initialize all the classes that implement the IPluginBase interface. Using the suggested DerivedHelper makes it a lot easier. read more...

add a comment |category: |Views: 21

tags: another

Enumerating the GAC using 'foreach'(sharpregion.com)

submitted by yoavsionyoavsion(345) 4 years, 1 month ago

Ever tried enumerating the Global assemblies cache? Now it has become easier. read more...

1 comment |category: |Views: 73

tags: another

[Flags] and you - Take 2(sharpregion.com)

submitted by yoavsionyoavsion(345) 4 years, 1 month ago

Comparing enum values can sometime leave your code a little messy and inaccessible. Using this small EnumHelper extension methods class, your code should be left a little more readable and fluent. read more...

add a comment |category: |Views: 14

tags: another

C# singleton snippet(sharpregion.com)

submitted by yoavsionyoavsion(345) 4 years, 1 month ago

I've decided to stop the copy-paste madness. Not that I use singletons so very often, but still - It never changes, so lets use a snippet. read more...

add a comment |category: |Views: 101

tags: another

Extreme (and silly) AOP(badri.blogsavy.com)

submitted by yoavsionyoavsion(345) 4 years, 4 months ago

Taking AOP to extremes. A funny post showing how to abuse the idea of AOP. read more...

add a comment |category: |Views: 24

tags: another