예제 #1
0
        public Task <Container <ColorPresentation> > Handle(ColorPresentationParams request, CancellationToken cancellationToken)
        {
            string label = request.Color.Red * 255 + ", " + request.Color.Green * 255 + ", " + request.Color.Blue * 255 + ", " + request.Color.Alpha * 255;

            var result = new Container <ColorPresentation>(new ColorPresentation[] {
                new ColorPresentation()
                {
                    Label    = label,
                    TextEdit = new TextEdit()
                    {
                        NewText = "CustomColor(" + label + ")",
                        Range   = request.Range
                    }
                }
            });

            return(Task.FromResult(result));
        }
예제 #2
0
 public static Task <Container <ColorPresentation> > ColorPresentation(this ILanguageClientDocument mediator, ColorPresentationParams @params, CancellationToken cancellationToken = default)
 {
     return(mediator.SendRequest(@params, cancellationToken));
 }
 public static Task <Container <ColorPresentation> > ColorPresentation(this ILanguageClientDocument mediator, ColorPresentationParams @params)
 {
     return(mediator.SendRequest <ColorPresentationParams, Container <ColorPresentation> >(DocumentNames.ColorPresentation, @params));
 }
 public override Task <Container <ColorPresentation> > Handle(ColorPresentationParams request, CancellationToken cancellationToken) => _handler.Invoke(request, cancellationToken);
 public abstract Task <Container <ColorPresentation> > Handle(ColorPresentationParams request, CancellationToken cancellationToken);
예제 #6
0
파일: services.cs 프로젝트: bitdotgames/bhl
 public abstract RpcResult ColorPresentation(ColorPresentationParams args);