public override object GetValue(object component) { WorkflowDataContext context = (WorkflowDataContext)component; using (ActivityContext context2 = context.ResolutionContext) { return(this.reference.GetLocation(context2).Value); } }
public override void SetValue(object component, object value) { if (this.IsReadOnly) { throw FxTrace.Exception.AsError(new NotSupportedException(System.Activities.SR.PropertyReadOnlyInWorkflowDataContext(this.Name))); } WorkflowDataContext context = (WorkflowDataContext)component; using (ActivityContext context2 = context.ResolutionContext) { this.reference.GetLocation(context2).Value = value; } }
public override object GetValue(object component) { WorkflowDataContext dataContext = (WorkflowDataContext)component; ActivityContext activityContext = dataContext.ResolutionContext; try { return(this.reference.GetLocation(activityContext).Value); } finally { activityContext.Dispose(); } }
public override void SetValue(object component, object value) { if (IsReadOnly) { throw FxTrace.Exception.AsError(new NotSupportedException(SR.PropertyReadOnlyInWorkflowDataContext(this.Name))); } WorkflowDataContext dataContext = (WorkflowDataContext)component; ActivityContext activityContext = dataContext.ResolutionContext; try { Location location = this.reference.GetLocation(activityContext); location.Value = value; } finally { activityContext.Dispose(); } }