예제 #1
0
    public static string RelationString(uint id, IState state, int minLength)
    {
        RelationName[] allStates =
            (RelationName[])Enum.GetValues(typeof(RelationName));

        string output = "";

        foreach (RelationName name in allStates)
            if (name != RelationName.INVALID)
                output += PrettyPrint(name, state.Require(id, new[] { name }));

        for (int i = output.Length; i < minLength; i++)
            output += " ";

        return output;
    }
예제 #2
0
    public static string StateString(IState state, int minLength)
    {
        StateName[] allStates =
            (StateName[])Enum.GetValues(typeof(StateName));

        string output = "";

        foreach (StateName name in allStates)
            if (name != StateName.ALL_ROLES && name != StateName.INVALID)
                output += PrettyPrint(name, state.Require(new [] { name }));

        for (int i = output.Length; i < minLength; i++)
            output += " ";

        return output;
    }