You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1017 B
33 lines
1017 B
4 years ago
|
using Newtonsoft.Json;
|
||
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace Monaco.Languages
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.completionlist.html
|
||
|
/// </summary>
|
||
|
public sealed class CompletionList : IEnumerable<CompletionItem> // TODO: Could I somehow also just make this a list? Investigate Json Serialization Converter helper for that?
|
||
|
{
|
||
|
[JsonProperty("isIncomplete", NullValueHandling = NullValueHandling.Ignore)]
|
||
|
public bool IsIncomplete { get; set; }
|
||
|
|
||
|
[JsonProperty("items")]
|
||
|
public IList<CompletionItem> Items { get; set; } = new List<CompletionItem>();
|
||
|
|
||
|
public IEnumerator<CompletionItem> GetEnumerator()
|
||
|
{
|
||
|
return Items.GetEnumerator();
|
||
|
}
|
||
|
|
||
|
IEnumerator IEnumerable.GetEnumerator()
|
||
|
{
|
||
|
return Items.GetEnumerator();
|
||
|
}
|
||
|
}
|
||
|
}
|