public static void PostGenerateCode(Behaviac.Design.MethodDef.Param param, StringWriter stream, string indent, string typename, string var, string caller, object parent, string setValue) { Behaviac.Design.ParInfo par = param.Value as Behaviac.Design.ParInfo; if (par != null) { ParInfoCsExporter.PostGenerateCode(par, null, stream, indent, typename, var, caller); return; } Behaviac.Design.VariableDef v = param.Value as Behaviac.Design.VariableDef; if (v != null) { VariableCsExporter.PostGenerateCode(v, stream, indent, typename, var, caller, parent, param.Name, setValue); return; } Type type = param.Value.GetType(); if (Plugin.IsCustomClassType(type) && !DesignerStruct.IsPureConstDatum(param.Value, parent, param.Name)) { StructCsExporter.PostGenerateCode(param.Value, stream, indent, var, parent, param.Name); } }
public static void PostGenerateCode(Behaviac.Design.VariableDef variable, StreamWriter stream, string indent, string typename, string var, string caller, object parent = null, string paramName = "", string setValue = null) { if (variable.ValueClass == Behaviac.Design.VariableDef.kConst) { Type type = variable.Value.GetType(); if (Plugin.IsCustomClassType(type) && !DesignerStruct.IsPureConstDatum(variable.Value, parent, paramName)) { StructCsExporter.PostGenerateCode(variable.Value, stream, indent, var, parent, paramName); } } else if (variable.Property != null) { PropertyCsExporter.PostGenerateCode(variable.Property, variable.ArrayIndexElement, stream, indent, typename, var, caller, setValue); } }