I have an activity that I am creating. I am using another activity... so that when my activity executes the activity calls the execute of another activity. The issue is that the other activity has a Execute method that looks like this protected override void Execute(CodeActivityContext executeContext)
. I thought the issue was that it was protected, so I derived my class with the class that had the method, but still no luck. Any suggestions?
Here is the activity in which I want to call the Execute statement into. I get an error at regClass.Execute(CodeActivityContext context);
that says CodeActivityContext a type but used as a variable.
namespace Communication.Bzip2
{
public sealed class Bzip2_Assemble_Activity : CodeActivity
{
private Programming.Registry_Get.Get_String_Value regClass;
public Bzip2_Assemble_Activity()
{
regClass = new Programming.Registry_Get.Get_String_Value();
}
protected override void Execute(CodeActivityContext context)
{
regClass.Execute(CodeActivityContext context);
}
}
}
Here is the code of the Execute statement I want to call from.
namespace Programming.Registry_Get
{
[Designer(typeof(GenericDesigner))]
public sealed class Get_String_Value : CodeActivity
{
protected override void Execute(CodeActivityContext context)
{
string KeyPath = this.kPath.Get(context);
string KeyName = this.kValueName.Get(context);
string KeyDirectory = Path.GetDirectoryName(KeyPath);
string subkey = Path.GetFileName(KeyPath);
string fullKeyPath = KeyDirectory + "\\" + subkey;
RegistryKey rk = Registry.CurrentUser.CreateSubKey(fullKeyPath);
object value = Registry.GetValue(fullKeyPath, KeyName, "");
context.SetValue(this.varValue, value.ToString());
}
}
}