Skip to content

KRPCDefaultValueAttribute for parameters #677

@djungelorm

Description

@djungelorm

KRPCDefaultValueAttribute is an attribute applied to a method, to set the default value of a parameter to a non-const value by name. For example:

[KRPCMethod]
[KRPCDefaultValue("param", typeof(ObjectConstructor))]
publid void MyMethod(Object param)

Instead this attribute should be applied to the parameter directly as follows:

[KRPCMethod]
publid void MyMethod([KRPCDefaultValue(typeof(ObjectConstructor)))] Object param)

This is more concise and less error prone. This is a breaking change, but AFAIK no one is using this feature outside of the kRPC repository.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions