__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# SPDX-License-Identifier: Apache-2.0
# Copyright 2019 The Meson development team
from __future__ import annotations
from mesonbuild.templates.sampleimpl import ClassImpl
hello_cs_template = '''using System;
public class {class_name} {{
const String PROJECT_NAME = "{project_name}";
static int Main(String[] args) {{
if (args.Length > 0) {{
System.Console.WriteLine(String.Format("{project_name} takes no arguments.."));
return 1;
}}
Console.WriteLine(String.Format("This is project {{0}}.", PROJECT_NAME));
return 0;
}}
}}
'''
hello_cs_meson_template = '''project('{project_name}', 'cs',
version : '{version}',
default_options : ['warning_level=3'])
exe = executable('{exe_name}', '{source_name}',
install : true)
test('basic', exe)
'''
lib_cs_template = '''
public class {class_name} {{
private const int number = 6;
public int get_number() {{
return number;
}}
}}
'''
lib_cs_test_template = '''using System;
public class {class_test} {{
static int Main(String[] args) {{
if (args.Length > 0) {{
System.Console.WriteLine("{project_name} takes no arguments..");
return 1;
}}
{class_name} c = new {class_name}();
Boolean result = true;
return result.CompareTo(c.get_number() != 6);
}}
}}
'''
lib_cs_meson_template = '''project('{project_name}', 'cs',
version : '{version}',
default_options : ['warning_level=3'])
stlib = shared_library('{lib_name}', '{source_file}',
install : true,
)
test_exe = executable('{test_exe_name}', '{test_source_file}',
link_with : stlib)
test('{test_name}', test_exe)
# Make this library usable as a Meson subproject.
{ltoken}_dep = declare_dependency(
include_directories: include_directories('.'),
link_with : stlib)
'''
class CSharpProject(ClassImpl):
source_ext = 'cs'
exe_template = hello_cs_template
exe_meson_template = hello_cs_meson_template
lib_template = lib_cs_template
lib_test_template = lib_cs_test_template
lib_meson_template = lib_cs_meson_template
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 0 B | 0644 |
|
| cpptemplates.py | File | 3.07 KB | 0644 |
|
| cstemplates.py | File | 2.04 KB | 0644 |
|
| ctemplates.py | File | 2.88 KB | 0644 |
|
| cudatemplates.py | File | 3.08 KB | 0644 |
|
| dlangtemplates.py | File | 2.52 KB | 0644 |
|
| fortrantemplates.py | File | 2.23 KB | 0644 |
|
| javatemplates.py | File | 2.13 KB | 0644 |
|
| mesontemplates.py | File | 3 KB | 0644 |
|
| objcpptemplates.py | File | 2.99 KB | 0644 |
|
| objctemplates.py | File | 2.91 KB | 0644 |
|
| rusttemplates.py | File | 1.86 KB | 0644 |
|
| samplefactory.py | File | 1.37 KB | 0644 |
|
| sampleimpl.py | File | 5.78 KB | 0644 |
|
| valatemplates.py | File | 1.97 KB | 0644 |
|