public override IEnumerable <TerminalGremlinStep> Resolve(IGraphModel model) { var type = this._value.GetType(); yield return(new TerminalGremlinStep( this._stepName, model .TryGetLabelOfType(type) .IfNone(type.Name))); }
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."))); }