private void RegisterWriter(MethodInfo method) { ReaderWriterProcessor.Log($"Found writer extension methods: {method.Name}"); var dataType = method.GetParameters()[1].ParameterType; writers.Register(module.ImportReference(dataType), module.ImportReference(method)); }
private void RegisterWriter(MethodInfo method) { if (method.GetParameters().Length != 2) { return; } if (method.GetParameters()[0].ParameterType.FullName != typeof(NetworkWriter).FullName) { return; } if (method.ReturnType != typeof(void)) { return; } Type dataType = method.GetParameters()[1].ParameterType; writers.Register(module.ImportReference(dataType), module.ImportReference(method)); }
private void RegisterWriter(MethodInfo method) { Type dataType = method.GetParameters()[1].ParameterType; writers.Register(module.ImportReference(dataType), module.ImportReference(method)); }