Skip to content

Please add default values for objects to documentation #158

@scottprahl

Description

@scottprahl

Is your feature request related to a problem? Please describe.
I have to look at the source code to know that SimulationInput() returns an object that has a (perfectly sensible) SourceInput value of DirectionalPointSourceInput

Describe the solution you'd like
Ideally this would be built into the documentation using the <returns> ... </returns> tag. For example, the CustomCircularSource tells us nothing about the returned object other than it is an ISource.

/// <summary>
/// Required code to create a source based on the input values
/// </summary>
/// <param name="rng">random number generator</param>
/// <returns>source class that implements ISource</returns>
public ISource CreateSource(Random rng = null)
{
    rng = rng ?? new Random();

    return new CustomCircularSource(
        this.OuterRadius,
        this.InnerRadius,
        this.SourceProfile,
        this.PolarAngleEmissionRange,
        this.AzimuthalAngleEmissionRange,
        this.NewDirectionOfPrincipalSourceAxis,
        this.TranslationFromOrigin,
        this.BeamRotationFromInwardNormal,
        this.InitialTissueRegionIndex) { Rng = rng };
}

Describe alternatives you've considered
Rummaging around in the source code works, but is tedious.

Additional context
This will be a lot of work. Starting with the object creation would be nice. It also seems like this is something that AI would be great at assisting with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions