All Projects → adrianoc → cecilifier

adrianoc / cecilifier

Licence: MIT license
A tool aiming to make it a little bit easier to learn Mono.Cecil

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to cecilifier

dbus-sample
Sample C/C++ code for basic D-Bus use case
Stars: ✭ 76 (+94.87%)
Mutual labels:  sample-code
FIDO-Server
Open-source FIDO server, featuring the FIDO2 standard.
Stars: ✭ 17 (-56.41%)
Mutual labels:  sample-code
Open-Terraria-API
Open Terraria API - Mac, Linux & Windows
Stars: ✭ 65 (+66.67%)
Mutual labels:  cecil
ILject
Provides a way which you can load a .NET dll/exe from disk, modify/inject IL, and then run the assembly all in memory without modifying the file.
Stars: ✭ 25 (-35.9%)
Mutual labels:  cecil
cloud-mdk-tutorial-samples
Sample from the SAP mobile development kit tutorials demonstrating various components and features of the MDK in the context of an enterprise mobile solution.
Stars: ✭ 16 (-58.97%)
Mutual labels:  sample-code
gruniozerca-gamebuino
A Gamebuino port of a homebrew NES game.
Stars: ✭ 11 (-71.79%)
Mutual labels:  sample-code
cloud-workflow-samples
Workflow sample projects as reference content. Users can download and import the content of this project to their tenant to understand and learn how to consume workflow.
Stars: ✭ 52 (+33.33%)
Mutual labels:  sample-code
hana-ml-samples
This project provides code examples for SAP HANA Predictive and Machine Learning scenarios and is educational content. It covers simple Predictive Analysis Library SQL examples as well as complete SAP HANA design-time “ML scenario”-application content or HANA-ML Python Notebook examples.
Stars: ✭ 67 (+71.79%)
Mutual labels:  sample-code
nodejs-rust-sample-module
A sample node module built with Rust. Calculates the closest airport to a given latlon coordinate.
Stars: ✭ 18 (-53.85%)
Mutual labels:  sample-code
cloud-cap-multitenancy
SAP Cloud Application Programming Model (CAP) sample code project with multitenancy using service manager-created SAP HANA containers for tenant data isolation.
Stars: ✭ 33 (-15.38%)
Mutual labels:  sample-code
iot-edge-samples
Showcase of various extension scenarios for SAP IoT Edge, intelligent edge computing software that provides "microservices at the edge" for Internet of Things (IoT).
Stars: ✭ 16 (-58.97%)
Mutual labels:  sample-code
ILStrip
C# Assembly unused classes/references/resources cleaner
Stars: ✭ 20 (-48.72%)
Mutual labels:  cecil
ui5-webcomponents-sample-react
UI5 Web Components Sample TODO application built with React.
Stars: ✭ 47 (+20.51%)
Mutual labels:  sample-code
blockchain
No description or website provided.
Stars: ✭ 28 (-28.21%)
Mutual labels:  sample-code
node-resthooksdemo
A simple node.js RESTHooks demo built upon the Sails Web Framework
Stars: ✭ 68 (+74.36%)
Mutual labels:  sample-code
btp-workflow-management-opensap
This repository contain the exercises for the openSAP course "Improve Business Processes with SAP Workflow Management."
Stars: ✭ 30 (-23.08%)
Mutual labels:  sample-code
hana-developer-cli-tool-example
Learn how to build a developer-centric SAP HANA command line tool, particularly designed to be used when performing SAP HANA development in non-SAP tooling (for example from VS Code).
Stars: ✭ 73 (+87.18%)
Mutual labels:  sample-code
pdftron-android-samples
PDFTron Android Samples
Stars: ✭ 30 (-23.08%)
Mutual labels:  sample-code
SampleFoodBlog
🔥 Android blog application, built with Firebase
Stars: ✭ 23 (-41.03%)
Mutual labels:  sample-code
cloud-espm-cloud-native
Enterprise Sales and Procurement Model (ESPM) Cloud Native is a project that showcases how an application can be made resilient by implementing resilience design patterns. This application is developed using Spring Boot framework and can be deployed locally as well as on SAP BTP, Cloud Foundry environment.
Stars: ✭ 29 (-25.64%)
Mutual labels:  sample-code

Cecilifier

About

Cecilifier is a tool meant to make it easier to learn how to use Mono.Cecil a library used to manipulate MS IL. It was developed after the idea of asmifier. You can read more details about it in its announcement blog.

You can use it live in this site.

Feel free to send comments, issues, MR, etc; I cannot promise I'll be responsive but I'll do my best.

How to help

License

Cecilifier is licensed under MIT license.

Supported Features

  • Attribute declaration / usage

  • Type declaration

    • Class
    • Struct
    • Enum
    • Interfaces
  • Member declaration

    • Properties
    • Indexers
    • Methods
    • Fields
  • Exception handling

  • Single dimensional arrays

  • Static generic methods

  • Generics

    • Type / method instantiation
    • Type / Method definition
    • Generic events
    • Constraints
    • Co/Contra variance
  • Pointer types (int*, void*, etc)

  • Fixed statement

  • for statment

  • Cast operator

  • Non-capturing lambdas(converting to Func<>/Action<>)

Unsupported Features

  • Events (wip, support most common cases)
  • default expression
  • Enumerator methods
  • Delegate (generic)
  • async/await
  • Newer C# syntax (elvis operator, static import, to name some)
  • Much more :(

How to use it

  • The easiest way is to browse to its site.
  • Another alternative is to build and run it locally (see bellow)

Orthogonal to these options, after you Cecilifier some code you can create a project and debug the generated code to get more insight about how Mono.Cecil works.

How To build

In order to build it you need at least .Net Core SDK 5.0

  • Pull the git repo
  • Open a console in the folder with the pulled source code
  • run dotnet build

You can run the website locally by typing:

cd Cecilifier.Web

dotnet run

Then you can open a browser at http://localhost:5000 (notice that https will not work locally)

How to add tests

First, and most importantly, tests should be self contained, clearly describing what they are testing and run quickly (unfortunately it is very likely that some of the existing tests does not meet this criteria, but nevertheless, we should strive to ;)

Existing tests work basically taking a snippet of code, Cecilifying it (generating the Mono.Cecil API calls to produce an assembly equivalent to the compiled snippet), compiling it, and finally either comparing the two assemblies or comparing the generated IL for some method with the expected output as in this example.

Ideally all tests should use the assembly comparison approach (as opposed to forcing developers to store the expected IL) but in some cases the comparison code would became too complex and in such cases I think it is ok to store the expected IL (anyway, I try to minimize the number of such tests).

How to report issues

If you hit a problem and you think it is an issue/bug in the code please follow the steps to report it:

  • Search in the open/resolved issues to make sure it is not already known
  • If you cannot find anything open a new issue and do your best to:
    • add a failing test (see How to add tests)
    • Make the title/description as clear / detailed as possible (do not assume anything; add as much details as possible)

Including a failing test is the best way to ensure the processing of the issue will happen as quick as possible and avoid any unnecessary delays.

Community

If you have any questions, suggestions or comments, feel free to join our discord channel at https://discord.gg/7P2sCk9 (I cannot guarantee that I'll be responsive but I'll do my best).

You can also reach me through twitter @adrianoverona

Build Status

Build Status codecov

Potential improvements

Disclaimer(s)

  • TL;DR; Use at your own :)
  • I am not a web designer/developer, so keep your expectations low (regarding the web site)
  • I do not claim to be an expert in Mono.Cecil; the code certainly does not handle a lot of cases
  • I do not claim that the generated code is suitable or even correct - I do have tests though :)
  • Even though I do some code cleanup there are still some code duplication

Thanks

I'd like to thank JetBrains for donating me a Rider license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].