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))); } } }
protected virtual void OnGetRuntimeDelegateArguments(IList <RuntimeDelegateArgument> runtimeDelegateArguments) { foreach (var property in this.GetType().GetTypeInfo().DeclaredProperties) { ArgumentDirection direction; Type innerType; if (ActivityUtilities.TryGetDelegateArgumentDirectionAndType(property.PropertyType, out direction, out innerType)) { runtimeDelegateArguments.Add(new RuntimeDelegateArgument(property.Name, innerType, direction, (DelegateArgument)property.GetValue(this))); } } }