Note, that calling base.OnSetValue(args)
is the same as calling args.ProceedSetValue()
, and calling base.OnGetValue(args)
is the same as calling args.ProceedGetValue()
. This means that you're calling the proceed methods twice in each of your handlers.
What you need to do is to call args.ProceedGetValue()
at the start of the OnGetValue
to read the encrypted value, and call args.ProceedSetValue()
at the end of the OnSetValue
to save the encrypted value.
public override void OnGetValue(LocationInterceptionArgs args)
{
args.ProceedGetValue();
if (args.Value != null)
{
args.Value = // decrypt
}
}
public override void OnSetValue(LocationInterceptionArgs args)
{
if (args.Value != null)
{
args.Value = // encrypt
}
args.ProceedSetValue();
}
Also, you don't need to apply the [MulticastPointcut]
attribute. It's used when developing composite aspects as described in Developing Composite Aspects.