Geeks With Blogs

News The Code Project

I am from Munshigonj, Bangladesh. For me, programming is a passion first, a hobby second, and a career third. My Primary Blog: http://weblogs.asp.net/razan/
Razan Paul Blog Explaining thoughts and findings is a great way to learn September 2009 Entries
Why should we use Channel factory instead of proxy generation to construct communication channel between client and server in WCF?
If we use proxy class to construct communication channel between server and client , then when we will change data contract, Service contract, callback contract we need to regenerate the proxy for client. If we use channel factory to construct the channel we do not need to change channel factory code when there is a change in data contract, service contract and callback contract. To use Channel Factory to construct channel between server and client , all the contracts must be kept in a separate DLL ......

Posted On Friday, September 18, 2009 8:18 PM

Testing whether two IP addresses are in the same network using c#.
IPv4 address has two basic parts: the network part and the host part. As we know, if network potions of two IPs are same, they are in the same network. By performing and operation between subnet mask and IP address, we can get the network portion of an IP. By this way, we have found the network portions of two IPs. Then just check whether the network portions are equal or not. For this the following code is written: 1: private static bool CheckWhetherInSameNetwork(s... firstIP, string subNet, string ......

Posted On Friday, September 18, 2009 8:05 PM

How can we make a deep copy of a WPF object?
We can make a deep copy of a WPF object using XamlWriter and XamlReader. Here the XamlWriter.Save is used to serialize the contents of a WPF object into xaml string. XamlReader.Load is used to parse XAML string into a WPF object. To make deep copy of an wpf UIelement , you can use the following method. 1: public UIElement DeepCopy(UIElement element) 2: { 3: string shapestring = XamlWriter.Save(element); 4: StringReader stringReader = new StringReader(shapestring); 5: XmlTextReader xmlTextReader = ......

Posted On Friday, September 18, 2009 8:00 PM

Remora Pattern by Ben Constable
According to Ben Constable, Remora Pattern allows you to attach a chunk of logic to any existing element that you have. This pattern can be implemented using an Attached Dependency Property in WPF. Here an Attached Dependency Property is attached with an object. When the object is initiated, it goes to set the value of the Attached Dependency Property, which results in calling an Attached Dependency Property Change event. In the event handler, you can add your intended functionality, which is the ......

Posted On Friday, September 18, 2009 7:55 PM

A scheduler to process a list of requests by a specific number of threads in c#.
This scheduler is not a time-based scheduler. It schedules the user tasks according to scheduling policy; scheduling policy is First Come First Serve. It performs the following tasks: It decides which request to execute next. Execute the request by one of the threads of manual thread pool if there is an idle thread in manual thread pool. Here a specific number of threads is used to process the clients request. When Scheduler starts, A pool of threads is created to process pending requests of client, ......

Posted On Friday, September 18, 2009 7:52 PM

Copyright © Razan | Powered by: GeeksWithBlogs.net | Join free