Coder Social home page Coder Social logo

Comments (7)

davyxu avatar davyxu commented on May 14, 2024
  1. 不是很懂说的什么意思
  2. 不支持二维数组, 也没有支持计划
  3. 请具体说明

from tabtoy.

zjwps avatar zjwps commented on May 14, 2024

1.现在的config.cs文件的生成是用printer/csharp.go 来生成的,期望可以用一个类似json文件来自定义一些东西。比如在public partial class 前面加上 [System.Serializable]。

我现在改源码生成自定义数据类是这种格式
[System.Serializable]
public partial class WeightInt
{
/// < summary >
///值
/// < /summary >
public int value = 1;// i
/// < summary >
///权重
/// < /summary >
public int weight = 100;// w
}
2.二维数组不支持的话,现在我用json替代了,比如分隔符是| 写成 [1,2]|[3,4]
3.注释的那一行如果有换行符的话生成的注释有问题。比如
1.注释1
2.注释2
生成的config.cs 里面
//1.注释1
2. 注释2

3 我改了一下printer/csharp.go 最主要的修改其中的Comment方法

func (self csharpField) Comment() string {

if self.FieldDescriptor.Comment == "" {
	return ""
}

return "/// <summary> \n		///"  + strings.Replace(self.FieldDescriptor.Comment, "\n", "\n		///", -1) +"\n		/// </summary>"

}

from tabtoy.

zjwps avatar zjwps commented on May 14, 2024

Excel忽略行现在支持了没有?没有的话稍微有点不方便。

from tabtoy.

davyxu avatar davyxu commented on May 14, 2024

忽略行特性暂时不添加, 因为有内容歧义

from tabtoy.

davyxu avatar davyxu commented on May 14, 2024

已经添加C#类头添加属性

from tabtoy.

davyxu avatar davyxu commented on May 14, 2024

你可以在使用空行作为内容分割, 空行后的内容不会被导出

from tabtoy.

zjwps avatar zjwps commented on May 14, 2024

不错不错,赞。

from tabtoy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.