Posts

Showing posts from February, 2011

WF 4 sample code

WF 4 Persistence, Tracking, and Bookmarks examples

Sample SendMail CodeActivity for WF4

using  System; using  System.Collections.Generic; using  System.Linq; using  System.Text; using  System.Activities; using  System.Net.Mail; using  System.Net; namespace  MDM.Workflow.Activities.Core {      public   class   SendMail  :  CodeActivity < SmtpStatusCode >     {          public   InArgument < string > SmtpHost {  get ;  set ; }          public   InArgument < int > Port {  get ;  set ; }          public   InArgument < bool > UseDefaultCredentials {  get ;  set ; }          public   InArgument < NetworkCredential > Credentials {  get ;  set ; }          public   InArgument < MailMessage > Message {  get ;  set ; }                   protected   override   SmtpStatusCode  Execute( CodeActivityContext  context)         {              try             {                  SmtpClient  SmtpClient1 =  new   SmtpClient (SmtpHost.Get(context));                 SmtpClient1.Port = Port.Get(context);                 SmtpClient1.UseDefaultCredentials = U

Sample WebServicesCall CodeActivity for WF4

using  System; using  System.Collections.Generic; using  System.Linq; using  System.Text; using  System.Activities; using  System.Net; using  System.IO; namespace  MDM.Workflow.Activities.Core {      public   class   WebServicesCall  :  CodeActivity < string >     {          public   InArgument < string > WebRequestUrl {  get ;  set ; }          public   InArgument < string > SoapIn {  get ;  set ; }          public   InArgument < string > SoapAction {  get ;  set ; }          public   InArgument < string > ContentType {  get ;  set ; }          public   InArgument < string > Accept {  get ;  set ; }          public   InArgument < string > Method {  get ;  set ; }          protected   override   string  Execute( CodeActivityContext  context)         {              string  ResponseText;              HttpWebRequest  HttpWebRequest1 = ( HttpWebRequest ) WebRequest .Create(WebRequestUrl.Get(context));             HttpWebRequest1.Headers.Add

Collapse Selection in Solution Explorer extension (For Visual Studio users)

Very useful VS2010 extension

visual studio 2010 undo bug

visual studio 2010 misses steps during undo/redo