public bool InterfaceGenerate(TsInterfaceEntity entity)
        {
            var tsInterface = new TsInterface(entity);

            var pageContent = tsInterface.TransformText();

            File.WriteAllText(FileName, pageContent);
            return(true);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            TsInterfaceEntity entity = new TsInterfaceEntity
            {
                ClassName     = "test",
                PropertyInfos = new List <PropertyInfo> {
                    new PropertyInfo {
                        PropertyName = "Isasync", TypeName = "boolean"
                    },
                    new PropertyInfo {
                        PropertyName = "TimeOut", TypeName = "number"
                    },
                    new PropertyInfo {
                        PropertyName = "BeforeRequest", TypeName = "any"
                    },
                }
            };

            var generator = new DtoGeneratorManager("sample.ts");

            generator.InterfaceGenerate(entity);
        }
Exemplo n.º 3
0
 public TsInterface(TsInterfaceEntity entity) : base()
 {
     Entity = entity;
 }