public ActivityDelegate Create() { ActivityDelegate delegateObject = Activator.CreateInstance(this.DelegateType) as ActivityDelegate; ActivityDelegateMetadata metadata = ActivityDelegateUtilities.GetMetadata(this.DelegateType); ActivityDelegateUtilities.FillDelegate(delegateObject, metadata); return(delegateObject); }
private void OnActivityDelegateChanged() { this.Arguments.Clear(); if (this.ActivityDelegate != null) { ActivityDelegateMetadata metadata = ActivityDelegateUtilities.GetMetadata(this.ActivityDelegate.ItemType); foreach (ActivityDelegateArgumentMetadata argument in metadata) { this.Arguments.Add(this.ActivityDelegate.Properties[argument.Name].Value); } this.isSetInternally = true; this.Handler = this.ActivityDelegate.Properties["Handler"].Value; this.isSetInternally = false; } else { this.isSetInternally = true; this.Handler = null; this.isSetInternally = false; } }