protected virtual void OnGetRuntimeDelegateArguments(IList <RuntimeDelegateArgument> runtimeDelegateArguments) { foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(this)) { if (ActivityUtilities.TryGetDelegateArgumentDirectionAndType(propertyDescriptor.PropertyType, out ArgumentDirection direction, out Type innerType)) { runtimeDelegateArguments.Add(new RuntimeDelegateArgument(propertyDescriptor.Name, innerType, direction, (DelegateArgument)propertyDescriptor.GetValue(this))); } } }
/// <summary> /// Called when [get runtime delegate arguments]. /// </summary> /// <param name="runtimeDelegateArguments">The runtime delegate arguments.</param> /// <exception cref="ArgumentNullException">runtimeDelegateArguments</exception> protected virtual void OnGetRuntimeDelegateArguments(IList <RuntimeDelegateArgument> runtimeDelegateArguments) { if (runtimeDelegateArguments == null) { throw new ArgumentNullException(nameof(runtimeDelegateArguments)); } foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(this)) { if (ActivityUtilities.TryGetDelegateArgumentDirectionAndType(propertyDescriptor.PropertyType, out var direction, out var innerType)) { runtimeDelegateArguments.Add( new RuntimeDelegateArgument( propertyDescriptor.Name, innerType, direction, (DelegateArgument)propertyDescriptor.GetValue(this))); } } }