using System.Collections.Generic;
using System.Threading.Tasks;
public static async Task Main()
Console.WriteLine("Demo example for user defined attributes");
string FileName = "myAttribute.txt";
# the attribute for all properties only (exclude classes).
Format=[JsonProperty ("{{PropName.ToCamelCase()}}")]
# the attribute for all classes only (exclude properties)
Format= [AdaptTo("{{Name}}Dto")]
File.WriteAllText(FileName, text);
public async Task RunAsync()
string url = "http://services.odata.org/V4/OData/OData.svc";
var cs = new OdataConnectionString{ServiceUrl = url};
Attributes = new List<string>{"myJson", "map"},
var code = await O2P.GeneratePocoAsync(cs, ps);
Console.WriteLine(e.Message);