windows workflow flowchart and exception handle
Supose that I have a flowchat with a receive, custom code activity and sendreply and the custom code activity throws an exceptions. How can I return to the receive activity? Any ideas? ...
Supose that I have a flowchat with a receive, custom code activity and sendreply and the custom code activity throws an exceptions. How can I return to the receive activity? Any ideas? ...
I have a List<> of objects containing two strings and a DateTime. I want to build another list of the same objects containing only the last unique items using the two strings as keys and the last DateTime value. In SQL think the following: SELECT col1, col2, MAX(datetime) FROM table GROUP BY col1, col2 This gives the unique list of co...
I have a variety of small C# winforms applications (though this should apply equally to any .NET app) which need to perform a few minor tasks when they are closed. I have been making use of the .FormClosing event to do things like write the current settings file and wait for background threads to finish, etc. Two questions came to mind...
I'm trying to make a client/server talk back and forth in a project i'm working on. It seems to work OK when talking between 2 windows services (so far). But it seems to run into some problems when i put the client side in a web service. It works fine at first until lots of requests hit it in quick succession at which point the web se...
I'm kinda new in the mobile world and wcf world. I have develop a mobile app that communicates with a WCF service. What security topics should I look into? I do not know much about security either ... usually you try to secure the channel? the messages being sent? ...
Ok so here's the story. I have an array of Assemblies which are initiated by [Assembly].LoadFrom() that load a number of DLL's. Upon initialising, a method called InitMain (from the DLL!) is called, which sets a number of variables outside of this method, like here: Public Class Example Dim C As Integer = 0 Public Sub InitMain...
I am working on a powershell script to post json data to a REST interface and am getting (400) Bad Request on each time. I am new to this, and am unclear as to if/how I should be encoding the data. I know I need to set the contenttype to application/json, but is the encoding choice I am using what is causing my problem, and if so what ...
I've made a chain of 4 producer-consumer threads (forming a 4 step pipeline). To my amazement, all four threads are running in sequence, instead of concurrently!!! That is, the second thread mysteriously waits until the first thread is entirely done producing. The third thread mysteriously waits until the second thread is entirely done...
Hi. I'm building a program in WPF which must feature multi-language support, with the ability to switch language at run-time. My question concerns the image part of the localization. I've built a solution which does not work the way I had hoped it would work and I would like some help fixing these problems. The code posted below is onl...
I'd like to have routes set up as follows: "xyz/" maps to one action method with no parameters, but "xyz/{username}" maps to a different action (in the same controller or not, doesn't matter) that takes an argument called username of type string. Here are my routes so far: routes.MapRoute( "Me", "Profile", new { controller ...
Hi, I am facing a problem with LINQ. Here is the code, public class TimeObject { public DateTime Time { get; set; } } private void TestLINQ() { List<TimeObject> results = new List<TimeObject>(); results.Add(new TimeObject() { Time = new DateTime(2010, 8, 1, 0, 10, 0)}); results.Add...
I have such .H file (from here) /* FFmpeg simple Encoder */ #ifndef __VIDEO_ENCODER_H__ #define __VIDEO_ENCODER_H__ #include "ffmpegInclude.h" #include <Windows.h> #include <string> class VideoEncoder { private: // output file name std::string outputFilename; // output format. AVOutputFormat *pOutFormat; // form...
I am in the process of moving from Visual Studio to Mono. I have a query which dumps about 190000 rows of a select statement into a a text file which I process from c#. Normally the whole thing goes well and is done in less than 7 seconds. On mono however, it gets to the ExecuteNonQuery, and the OUTFILE is created successfully of exac...
I need to be able to direct sound output from my application to all of a system's audio outputs - specifically, both the built-in speakers and headphones of a laptop. I'm using C# on Windows Vista/7 and the latest version of the .NET Framework, and don't need to support older (i.e. Windows XP) OSes. I was able to successfully use the C...
Hi guys, Perhaps this question was already asked million times but I couldn't find similar topic. Is it possible to write a generic class with multiple 'where'-s that will be checked in compile time? Here is what I have today public class MsBitsEnumWrapper<TC, TE> : IEnumerable<TC> { internal class Helper : IEnumerator<TC> { ...
Hi folks, In a number of our web applications, we make calls to 3rd part API's like Twitter, etc. Nothing new there. What we would like to do is to grab some statistics about our website usage -> how many calls we are making every hour and day to our various free and paid 3rd party API's. I'm not sure how we can do this. Now, I've us...
I prefer C# as a language over Java, but I have been unable to find anything similar to the jMonkey Engine for Java. I want the feature of just being able to simply add blocks (called Box in jMonkey Engine) to my world instead of loading models. Maybe I am just missing something, but I haven't found anything similar in any of the C# th...
Does anybody know how to format and control the values shown on the Y-Axis of a .Net 4 DataVisualization.Charting chart? I have values on the Y-Axis and dates on the X-Axis. The values on the Y-Axis are showing multiple decimal points and I want to apply a custom formatter to them so that I can show them in any format I want. So for exa...
Hello! I have got a new assignment for developping an e-commerce website. I need to accept online payment via all the common cards (Visa, MasterCard, etc). But am confuded about how I should implement it. I want to add direct payment with credit card to the website without passing by paypal. Can anyone guide me on how should i proceed p...
Hello everyone! I would like to use the same code for copying files to an FTP server, and through USB. I've already written some code, which as of now uses functions from the System.IO namespace. To minimize code duplication, I've listed the functions which I need from the system.IO namespace, and I was thinking of designing an interfa...