Exemplo n.º 1
0
        public override IEnumerable <TerminalGremlinStep> Resolve(IGraphModel model)
        {
            var type = this._value.GetType();

            yield return(new TerminalGremlinStep(
                             this._stepName,
                             model
                             .TryGetLabelOfType(type)
                             .IfNone(type.Name)));
        }
Exemplo n.º 2
0
 public static string GetLabelOfType(this IGraphModel model, Type type)
 {
     return(model
            .TryGetLabelOfType(type)
            .IfNone(() => throw new ArgumentException($"Cannot find label of type {type} in model.")));
 }