Skip to content
Snippets Groups Projects
Commit 0e1d4a7c authored by svatal's avatar svatal
Browse files

fixed generator not to prefix native types

parent 8203b745
Branches master
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Overlay
/// <summary>
/// Gets or sets Quad to highlight
/// </summary>
public DOM.double[] Quad { get; set; }
public double[] Quad { get; set; }
/// <summary>
/// Gets or sets The highlight fill color (default: transparent).
/// </summary>
......
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
......@@ -139,7 +137,10 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator
{
itemsType = items.TypeReference;
}
domainDictionary[type.Name] = domain + "." + itemsType + "[]";
if (IsGeneratedNativeType(itemsType))
domainDictionary[type.Name] = itemsType + "[]";
else
domainDictionary[type.Name] = domain + "." + itemsType + "[]";
}
private static void WriteProtocolClasses(DirectoryInfo directory, string ns, string domainName, IEnumerable<Type> types, IEnumerable<Command> commands, IEnumerable<Event> events)
......@@ -481,6 +482,20 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator
}
}
private static bool IsGeneratedNativeType(string propertyType)
{
switch (propertyType)
{
case "double":
case "long":
case "bool":
case "object":
return true;
default:
return false;
}
}
private static string GeneratePropertyName(string propertyName)
{
return ToCamelCase(propertyName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment