Rewrite to direct constructors
This commit is contained in:
@@ -11,7 +11,7 @@ namespace mROA.Codegen
|
||||
public sealed class RemoteTypeBinder
|
||||
{
|
||||
static RemoteTypeBinder(){
|
||||
RemoteInstanceRepository.RemoteTypes = new Dictionary<Type, Type> {
|
||||
RemoteInstanceRepository.RemoteTypeFactories = new Dictionary<Type, Func<int, IRepresentationModule, IEndPointContext, RemoteObjectBase>> {
|
||||
<!I remoteTypePair r sep typesSep><!D typesSep>,
|
||||
<!D>
|
||||
};
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace mROA.Codegen
|
||||
context.AddSource($"{className}.g.cs", SourceText.From(code, Encoding.UTF8));
|
||||
#endif
|
||||
_binderTemplate.Insert("remoteTypePair",
|
||||
$"{{ typeof({classSymbol.ToUnityString()}), typeof({namespaceName}.{className}) }}");
|
||||
$"{{ typeof({classSymbol.ToUnityString()}), (i, r, c) => new {namespaceName}.{className}(i, r, c) }}");
|
||||
}
|
||||
|
||||
if (totalMethods.Count != 0)
|
||||
|
||||
Reference in New Issue
Block a user