Am quite new to using Ninject on WCF and WF and am currently stuck on how can i use property injection on a CodeActivity Class
Example
public sealed class TestInjection : CodeActivty
{
[Inject]
public IRepository Repository { get; set; }
// Define an activity input argument of type string
public InArgument<string> Text { get; set; }
// If your activity returns a value, derive from CodeActivity<TResult>
// and return the value from the Execute method.
protected override void Execute(CodeActivityContext context)
{
// Obtain the runtime value of the Text input argument
string text = context.GetValue(this.Text);
var name = Repository.GetSomeNAme(); ///Repository is always Null/ never gets injected
}
}
Please help!!
Have a look at the WF extension:
https://github.com/ninject/ninject.extensions.wf
https://github.com/ninject/ninject.extensions.wf/wiki