MCPcopy Create free account
hub / github.com/Autodesk/AutomaticComponentToolkit / getCSharpParameterType

Function getCSharpParameterType

Source/buildbindingcsharp.go:111–217  ·  view source on GitHub ↗
(ParamTypeName string, NameSpace string, ParamClass string, isPlain bool)

Source from the content-addressed store, hash-verified

109}
110
111func getCSharpParameterType(ParamTypeName string, NameSpace string, ParamClass string, isPlain bool) (string, error) {
112 CSharpParamTypeName := ""
113 switch ParamTypeName {
114 case "uint8":
115 CSharpParamTypeName = "Byte"
116
117 case "uint16":
118 CSharpParamTypeName = "UInt16"
119
120 case "uint32":
121 CSharpParamTypeName = "UInt32"
122
123 case "uint64":
124 CSharpParamTypeName = "UInt64"
125
126 case "int8":
127 CSharpParamTypeName = "Int8"
128
129 case "int16":
130 CSharpParamTypeName = "Int16"
131
132 case "int32":
133 CSharpParamTypeName = "Int32"
134
135 case "int64":
136 CSharpParamTypeName = "Int64"
137
138 case "bool":
139 if isPlain {
140 CSharpParamTypeName = "Byte"
141 } else {
142 CSharpParamTypeName = "bool"
143 }
144
145 case "single":
146 CSharpParamTypeName = "Single"
147
148 case "double":
149 CSharpParamTypeName = "Double"
150
151 case "pointer":
152 CSharpParamTypeName = "UInt64"
153
154 case "string":
155 if isPlain {
156 CSharpParamTypeName = "byte[]"
157 } else {
158 CSharpParamTypeName = "String"
159 }
160
161 case "enum":
162 if isPlain {
163 CSharpParamTypeName = "Int32"
164 } else {
165 CSharpParamTypeName = "e" + ParamClass
166 }
167
168 case "functiontype":

Calls 1

decomposeParamClassNameFunction · 0.85

Tested by

no test coverage detected