chore: dotnet connect + generator

This commit is contained in:
Pavel Feldman 2021-08-16 12:49:00 -07:00
parent 101662765c
commit 7b861dcee6
2 changed files with 24 additions and 4 deletions

View File

@ -85,7 +85,6 @@ class BrowserTypeExamples
```
## async method: BrowserType.connect
* langs: js, python, java
- returns: <[Browser]>
This methods attaches Playwright to an existing browser instance.
@ -97,13 +96,11 @@ This methods attaches Playwright to an existing browser instance.
A browser websocket endpoint to connect to.
### option: BrowserType.connect.headers
* langs: java, python, js
- `headers` <[Object]<[string], [string]>>
Additional HTTP headers to be sent with web socket connect request. Optional.
### option: BrowserType.connect.slowMo
* langs: java, python, js
- `slowMo` <[float]>
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you
@ -116,7 +113,6 @@ can see what is going on. Defaults to 0.
Logger sink for Playwright logging. Optional.
### option: BrowserType.connect.timeout
* langs: java, python, js
- `timeout` <[float]>
Maximum time in milliseconds to wait for the connection to be established. Defaults to

View File

@ -149,6 +149,30 @@ for (const [name, item] of Object.entries(protocol)) {
const init = objectType(item.initializer || {}, ' ');
const initializerName = channelName + 'Initializer';
const superName = inherits.get(name);
channels_ts.push(`/*
* MIT License
*
* Copyright (c) Microsoft Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
`)
channels_ts.push('using System.Collections.Generic;');
channels_ts.push('using Microsoft.Playwright.Core;');
channels_ts.push(``);