コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        private void RegisterWriter(MethodInfo method)
        {
            Type dataType = method.GetParameters()[1].ParameterType;

            writers.Register(module.ImportReference(dataType), module.ImportReference(method));
        }