public async Task <IMember> GetValueFromPropertyAsync(IPythonPropertyType p, IPythonInstance instance, CancellationToken cancellationToken = default) { // Function may not have been walked yet. Do it now. await SymbolTable.EvaluateAsync(p.FunctionDefinition, cancellationToken); return(instance.Call(p.Name, ArgumentSet.Empty)); }
private string GetPropertyHoverString(IPythonPropertyType prop, int overloadIndex = 0) { var decTypeString = prop.DeclaringType != null ? $"{prop.DeclaringType.Name}." : string.Empty; var propDoc = !string.IsNullOrEmpty(prop.Documentation) ? $"\n---\n{prop.MarkdownDoc()}" : string.Empty; return($"```\n{decTypeString}\n```{propDoc}"); }
private IMember GetValueFromProperty(IPythonPropertyType p, IPythonInstance instance, CallExpression expr) { // Function may not have been walked yet. Do it now. SymbolTable.Evaluate(p.FunctionDefinition); return(instance.Call(p.Name, ArgumentSet.Empty(expr, this))); }
public IMember GetValueFromProperty(IPythonPropertyType p, IPythonInstance instance) { // Function may not have been walked yet. Do it now. SymbolTable.Evaluate(p.FunctionDefinition); return(instance.Call(p.Name, ArgumentSet.Empty)); }
public PropertyModel(IPythonPropertyType prop) : base(prop) { ReturnType = prop.ReturnType.GetPersistentQualifiedName(); }
} // For de-serializer from JSON public PropertyModel(IPythonPropertyType prop, IServiceContainer services) : base(prop, services) { ReturnType = prop.ReturnType.GetPersistentQualifiedName(services); IsReadOnly = prop.IsReadOnly; }