Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting enum properties #54

Open
PavelBal opened this issue Aug 31, 2023 · 1 comment
Open

Setting enum properties #54

PavelBal opened this issue Aug 31, 2023 · 1 comment

Comments

@PavelBal
Copy link
Member

Getting enum names is implemented by the function clrGetEnumNames().

For setting enum properties, there is R dummy code:

#' Sets the value of an enum field or property of an object or class
#'
#' @param objOrType a CLR object, or type name, possibly namespace and assembly qualified type name, e.g. 'My.Namespace.MyClass,MyAssemblyName'.
#' @param name the name of a field/property of the object
#' @param enumtype type name, possibly namespace and assembly qualified type name, e.g. 'My.Namespace.MyClass,MyAssemblyName'.
#' @param enumval the value to set the field with
#' @export
clrSetEnumProperty <- function(objOrType, name, enumtype, enumval) {
  stop("Not yet implemented")
  return(clrCallStatic(rNETenv$reflectionHelperTypeName, "SetEnumValue", objOrType, name, enumtype, enumval))
}

However, SetEnumValue is not implemented in .NET.

@PavelBal
Copy link
Member Author

Not a prio now.

@PavelBal PavelBal transferred this issue from Open-Systems-Pharmacology/rClr Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant