|
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
namespace CommunicationCallExternalMethod
{
public sealed partial class Workflow1: SequentialWorkflowActivity
{
//Enter the variables that hold the parameters as properties
string _filepath = string.Empty;
int _quantity = 0;
public String _response = default(System.String);
/// <summary>
/// The Property name must be the same as the object in the
/// input parameter dictionary
/// </summary>
public int Quantity
{
get { return _quantity; }
set { _quantity = value; }
}
/// <summary>
/// The Property name must be the same as the object in the
/// input parameter dictionary
/// </summary>
public string FilePath
{
get { return _filepath; }
set { _filepath = value; }
}
public Workflow1()
{
InitializeComponent();
}
private void GetInfoFromFile(object sender, EventArgs e)
{
using (System.IO.StreamReader sr = new System.IO.StreamReader(_filepath))
{
char[] ac = new char[_quantity + 1];
sr.Read(ac, 0, _quantity);
_response = new String(ac);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Jose A. Garcia Guirado, Electronic Engineer, graduated in Havana/Cuba 1982, MCTS, MCSD.NET, MCAD.NET, MCSE. Worked in the Institute for Cybernetics and Mathematics of Academy of Science of Cuba for 8 years; since 1995 working as free software architect, developer and adviser, first in Argentina and from 2003 to 2010, in Germany as External consultant in DWS Luxembourg, AIXTRON AG and Shell Deutschland GmbH and from 2010 to 2012 in Mexico working for Twenty Century Fox, and Mexico Stock Exchange (BMV). From 2013 to now in USA, Florida, First in FAME Inc. and now as Senior Software Engineer in Spirit Airlines.