DCSIMG
C# - Wortzel's blog

Wortzel's blog

.Net (2.0, 3.0, 3.5), C#, Asp.net, Com+, GIS(ESRI Software), Management, Analysis & Design, Life, Trips, And more...

Browse by Tags

All Tags » C# (RSS)
How to serialize anonymous delegates
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...

Posted Friday, June 20, 2008 2:21 PM by Avi Wortzel | 1 comment(s)

תגים:,

String manipulation tricks
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...

Posted Thursday, May 29, 2008 11:18 PM by Avi Wortzel | 3 comment(s)

תגים:,

How to add a custom configuration section
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...

Posted Tuesday, October 23, 2007 8:34 AM by Avi Wortzel | 6 comment(s)

How to declare a javascript file as an embedded resource in assembly
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...

Posted Wednesday, June 13, 2007 8:34 PM by Avi Wortzel | 4 comment(s)

תגים:, ,

Export to PDF open source framework
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...

Posted Wednesday, June 13, 2007 7:21 AM by Avi Wortzel | with no comments