reflectGetDocs

Members

Static variables

reflectGetDocs
immutable(ReflectDoc!target[]) reflectGetDocs;
Undocumented in source.
reflectGetDocs
immutable(ReflectDoc!target[]) reflectGetDocs;
Undocumented in source.

Examples

enum E
{
    @reflectDoc("alpha")
    a,
    @reflectDoc!"C#"("Beta", reflectUnittest!"C#"("some c# code"))
    @reflectDoc("beta")
    b,
    c,
}

alias Doc = ReflectDoc!null;
alias CSDoc = ReflectDoc!"C#";

static assert(reflectGetDocs!null(E.a) == [Doc("alpha")]);
static assert(reflectGetDocs!"C#"(E.b) == [CSDoc("Beta", reflectUnittest!"C#"("some c# code"))]);
static assert(reflectGetDocs!null(E.b) == [Doc("beta")]);
static assert(reflectGetDocs!null(E.c) is null);

struct S
{
    @reflectDoc("alpha")
    @reflectDoc!"C#"("Alpha")
    int a;
}

static assert(reflectGetDocs!(null, S.a) == [Doc("alpha")]);
static assert(reflectGetDocs!("C#", S.a) == [CSDoc("Alpha")]);

import std.conv: to;
static assert(CSDoc("Beta", reflectUnittest!"C#"("some c# code")).to!string == "Beta\nExample usage:\nsome c# code");

Meta