/// <summary> /// https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.icommoncodeeditor.html#deltadecorations /// /// Using <see cref="Decorations"/> Property to manipulate decorations instead of calling this directly. /// </summary> /// <param name="newDecorations"></param> /// <returns></returns> private IAsyncAction DeltaDecorationsHelperAsync([ReadOnlyArray] IModelDeltaDecoration[] newDecorations) { var newDecorationsAdjust = newDecorations ?? Array.Empty <IModelDeltaDecoration>(); // Update Styles return(InvokeScriptAsync("updateStyle", CssStyleBroker.GetInstance(this).GetStyles()).ContinueWith((noop) => { // Send Command to Modify Decorations // IMPORTANT: Need to cast to object here as we want this to be a single array object passed as a parameter, not a list of parameters to expand. return InvokeScriptAsync("updateDecorations", (object)newDecorationsAdjust); }).AsAsyncAction()); }
public string ToCss() { return(CssStyleBroker.WrapCssClassName(this, string.Format("background: url(\"{0}\");", GlyphImage.AbsoluteUri))); }
public CssGlyphStyle(CodeEditor editor) { Name = CssStyleBroker.GetInstance(editor).Register(this); }