Path: blob/trunk/third_party/dotnet/devtools/src/generator/Templates/DevToolsSessionDomains.hbs
4016 views
// <auto-generated />
namespace {{rootNamespace}}
{
using System;
///<summary>
/// The active domains for a DevTools session.
///</summary>
public class DevToolsSessionDomains : OpenQA.Selenium.DevTools.DevToolsSessionDomains
{
{{#each domains}}
private Lazy<{{dehumanize Name}}.{{dehumanize Name}}Adapter> m_{{dehumanize Name}};
{{/each}}
/// <summary>
/// Initializes a new instance of the DevToolsSessionDomains class.
/// </summary>
/// <param name="session">The DevTools session to be used with the domains</param>
public DevToolsSessionDomains(IDevToolsSession session) : base()
{
{{#each domains}}
m_{{dehumanize Name}} = new Lazy<{{dehumanize Name}}.{{dehumanize Name}}Adapter>(() => new {{dehumanize Name}}.{{dehumanize Name}}Adapter(session));
{{/each}}
}
{{#each domains}}
/// <summary>
/// Gets the adapter for the {{Name}} domain.
/// </summary>
public {{dehumanize Name}}.{{dehumanize Name}}Adapter {{dehumanize Name}}
{
get { return m_{{dehumanize Name}}.Value; }
}
{{/each}}
/// <summary>
/// Populates the data structure mapping commands to the type for the command response.
/// </summary>
protected override void PopulateCommandResponseTypeMap()
{
{{#each commands}}
ResponseTypeMap.AddCommandResponseType(typeof({{FullTypeName}}), typeof({{FullResponseTypeName}}));
{{/each}}
}
}
}