Browse by Tags
All Tags »
C# (
RSS)
Few days ago we faced an interesting challenge, we needed to implement a component which can move some code execution from a web context to a different context (like a service host in a windows service). The request first came up when we needed to perform a heavy processing work which started in a web context. Furthermore, we had some additional constraints like: This process shouldn’t use the same web application thread pool and we needed it will execute in a high isolation level. We chose to implement...
Did you ever need to do some string manipulation? For example, in a case you have a collection of string and you want to display it nicely in GUI with a separator? Or, if you want to check if a string contains a value? Or just to build your SQL statement in a case you need to create an "IN" clause and you have a collection as a parameter? String class gives us some powerful helper methods which help us to manipulate our strings. I'm really sure that you already familiar with some of...
It's a best practice to work with strong types instead of typing the name of the class/properties by our own hands. One of the common places that we are usually typing a string is when we're retrieving data from configuration file. In this post I will show you how to declare a custom configuration section with a strongly typed class. 1. Declare the configuration section in configuration file: < configSections > < section name = " serviceSettings " type = " ServiceSettingsHandler...
There are many scenarios it is recommended to use an embedded resource which is part of the assembly. One of the common cases is having a custom control with custom script file and wanting to ship them in a close assembly to other projects. Thanks to deployments reasons we prefer to ship only the assembly without the other resource files. There is a simple approach to do it in .Net 2.0. Ok, what do we have to do in order to accomplish this task? Assumptions: - We have a custom control which is called...
On my last project I had a mission to find an appropriate framework for exporting some images and text to a Pdf file format. The basic guidelines that lead me were: - This framework should be developed under the .Net framework. - It must be an open source code and not just black box. - The export to a Pdf process shouldn't affect the exported image quality. - The framework will be easily to use. After searching over the net I found the solution => The ITextSharp framework answers all my requirements...