src/vs/workbench/api/common/extHostDebugService.ts/ExtHostDebugServiceBase/convertToDto
class ExtHostDebugServiceBase:	private convertToDto(x: vscode.DebugAdapterDescriptor): Dto<IAdapterDescriptor> {

		if (x instanceof DebugAdapterExecutable) {
			return <IDebugAdapterExecutable>{
				type: 'executable',
				command: x.command,
				args: x.args,
				options: x.options
			};
		} else if (x instanceof DebugAdapterServer) {
			return <IDebugAdapterServer>{
				type: 'server',
				port: x.port,
				host: x.host
			};
		} else if (x instanceof DebugAdapterNamedPipeServer) {
			return <IDebugAdapterNamedPipeServer>{
				type: 'pipeServer',
				path: x.path
			};
		} else if (x instanceof DebugAdapterInlineImplementation) {
			return <Dto<IAdapterDescriptor>>{
				type: 'implementation',
				implementation: x.implementation
			};
		} else {
			throw new Error('convertToDto unexpected type');
		}
	}