BTDB.IL.SourceCodeWriter.StartMethod C# (CSharp) Method

StartMethod() private method

private StartMethod ( string name, MethodInfo mi ) : void
name string
mi System.Reflection.MethodInfo
return void
        internal void StartMethod(string name, MethodInfo mi)
        {
            StartMethod(name, mi.ReturnType, mi.GetParameters().Select(p => p.ParameterType).ToArray(), MethodAttributes.Static);
        }

Same methods

SourceCodeWriter::StartMethod ( string name, Type returns, Type parameters, MethodAttributes methodAttributes ) : void

Usage Example

Esempio n. 1
0
        public IILMethod DefineMethod(string name, Type returns, Type[] parameters, MethodAttributes methodAttributes = MethodAttributes.Public)
        {
            CloseInScope();
            _sourceCodeWriter.StartMethod(name, returns, parameters, methodAttributes);
            var methodBuilder = _typeBuilder.DefineMethod(name, methodAttributes, returns, parameters);

            for (int i = 0; i < parameters.Length; i++)
            {
                methodBuilder.DefineParameter(i + 1, ParameterAttributes.In, $"arg{i}");
            }
            return(new ILMethodDebugImpl(methodBuilder, _sourceCodeWriter, name, returns, parameters, _forbidenInstructions));
        }
All Usage Examples Of BTDB.IL.SourceCodeWriter::StartMethod