Add this to API_PARAM for static method extension of a type
This commit is contained in:
@@ -1005,6 +1005,8 @@ namespace Flax.Build.Bindings
|
||||
contents.Append("out ");
|
||||
else if (parameterInfo.IsRef)
|
||||
contents.Append("ref ");
|
||||
else if (parameterInfo.IsThis)
|
||||
contents.Append("this ");
|
||||
contents.Append(managedType);
|
||||
contents.Append(' ');
|
||||
contents.Append(parameterInfo.Name);
|
||||
@@ -1064,6 +1066,8 @@ namespace Flax.Build.Bindings
|
||||
contents.Append("out ");
|
||||
else if (parameterInfo.IsRef)
|
||||
contents.Append("ref ");
|
||||
else if (parameterInfo.IsThis)
|
||||
contents.Append("this ");
|
||||
contents.Append(managedType);
|
||||
contents.Append(' ');
|
||||
contents.Append(parameterInfo.Name);
|
||||
@@ -1374,6 +1378,8 @@ namespace Flax.Build.Bindings
|
||||
contents.Append("out ");
|
||||
else if (parameterInfo.IsRef)
|
||||
contents.Append("ref ");
|
||||
else if (parameterInfo.IsThis)
|
||||
contents.Append("this ");
|
||||
contents.Append(managedType);
|
||||
contents.Append(' ');
|
||||
contents.Append(parameterInfo.Name);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Flax.Build.Bindings
|
||||
partial class BindingsGenerator
|
||||
{
|
||||
private static readonly Dictionary<string, Type> TypeCache = new Dictionary<string, Type>();
|
||||
private const int CacheVersion = 17;
|
||||
private const int CacheVersion = 18;
|
||||
|
||||
internal static void Write(BinaryWriter writer, string e)
|
||||
{
|
||||
|
||||
@@ -334,6 +334,9 @@ namespace Flax.Build.Bindings
|
||||
case "out":
|
||||
currentParam.IsOut = true;
|
||||
break;
|
||||
case "this":
|
||||
currentParam.IsThis = true;
|
||||
break;
|
||||
case "attributes":
|
||||
currentParam.Attributes = tag.Value;
|
||||
break;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Flax.Build.Bindings
|
||||
public string Attributes;
|
||||
public bool IsRef;
|
||||
public bool IsOut;
|
||||
public bool IsThis;
|
||||
|
||||
public bool HasDefaultValue => !string.IsNullOrEmpty(DefaultValue);
|
||||
|
||||
@@ -35,6 +36,7 @@ namespace Flax.Build.Bindings
|
||||
// TODO: convert into flags
|
||||
writer.Write(IsRef);
|
||||
writer.Write(IsOut);
|
||||
writer.Write(IsThis);
|
||||
}
|
||||
|
||||
public void Read(BinaryReader reader)
|
||||
@@ -46,6 +48,7 @@ namespace Flax.Build.Bindings
|
||||
// TODO: convert into flags
|
||||
IsRef = reader.ReadBoolean();
|
||||
IsOut = reader.ReadBoolean();
|
||||
IsThis = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
Reference in New Issue
Block a user