public void ClassWithEnumFromUnrelatedClass() { var c = new Copier(); c.AddType(typeof(MockRequest)); c.AddType(typeof(OtherMockRequest)); c.AddType(typeof(MockResponse)); var r = c.Process(); Console.WriteLine(r); }
public void TokenTest() { var settings = new CopierSettings(); settings.BaseTypesToRemove.Add(typeof(BaseServiceInstance <,>)); var c = new Copier(settings); c.LimitOutputToAssemblyOfType(typeof(AccountRequest)); c.AddType(typeof(AccountRequest)); c.AddType(typeof(AccountResponse)); var r = c.Process(); Console.WriteLine(r); }
public string ModelDuplicator() { (string, string)replaceWith = ($"Gtt.Links.Core", $"Gtt.Links.Client"); var settings = new CopierSettings(); settings.BaseTypesToRemove.Add(typeof(BaseServiceInstance <,>)); settings.BaseTypesToRemove.Add(typeof(BaseStatefulServiceInstance <, , , ,>)); var mt = new Copier(settings) { AlwaysGetAndSet = true, ReplaceNamespace = replaceWith }; mt.LimitOutputToAssemblyOfType(typeof(HealthCheckRequest)); foreach (var instance in _instances) { mt.AddType(instance.RequestType); mt.AddType(instance.ResponseType); } return(mt.Process()); }
public void ServiceTestWithReplacementType() { var settings = new CopierSettings { ReplacementTypes = { { typeof(TokenDate), typeof(DateTime) }, { typeof(TokenString), typeof(string) }, } }; settings.BaseTypesToRemove.Add(typeof(BaseServiceInstance <,>)); var c = new Copier(settings); c.LimitOutputToAssemblyOfType(typeof(TokenRequest)); c.AddType(typeof(TokenRequest)); var r = c.Process(); Console.WriteLine(r); }
public void BasicClassTest() { var c = new Copier(); //c.LimitOutputToAssemblyOfType(typeof(Common.Models.Root)); c.AddType(typeof(GenericBase)); c.AddType(typeof(Basic)); c.AddType(typeof(ServiceResponse <CompoundResponse>)); c.AddType(typeof(MockRequest)); c.AddType(typeof(OtherMockRequest)); c.AddType(typeof(MockResponse)); var r = c.Process(); Console.WriteLine(r); }