BACnet.SchemaCompiler.CodeGen.CSharpTypeGenerator.CSharpEmitter.StaticMethod C# (CSharp) Method

StaticMethod() public method

Enters a new static method
public StaticMethod ( string name, string returnType, Parameter parameters, Access access = Access.Public, bool @new = false ) : CSharpEmitter
name string The name of the method
returnType string The return type of the method
parameters Parameter The parameters of the method
access Access The access specifier of the method
@new bool
return CSharpEmitter
            public CSharpEmitter StaticMethod(string name, string returnType, Parameter[] parameters, Access access = Access.Public, bool @new = false)
            {
                var paramsArr = parameters.Select(p => p.Type + " " + p.Name).ToArray();
                var paramsStr = String.Join(", ", paramsArr);

                WriteLine("{0} static {1}{2} {3}({4})",
                    access.ToAccessString(),
                    @new ? "new " : string.Empty,
                    returnType,
                    name,
                    paramsStr);
                WriteLineRaw("{");

                return _newScope();
            }