Skip to content

exercism/csharp-representer

Folders and files

NameName
Last commit message
Last commit date
Jun 18, 2021
Feb 1, 2025
Aug 9, 2023
Dec 31, 2024
Nov 1, 2023
Aug 9, 2023
Oct 9, 2019
Nov 1, 2023
Aug 9, 2023
Oct 9, 2019
Mar 1, 2024
Dec 31, 2024
Aug 9, 2023
Oct 9, 2019
Aug 9, 2023

Repository files navigation

Exercism C# representer

A representer creates a general representation of a submission, in order to automatically give feedback on similar code.

This repository contains the C# representer, which implements the representer interface. It uses Roslyn to parse the submission's source code into syntax trees, which are then normalized and output as a representation.

Generate a representation for a solution

To create a representation of a solution, follow these steps:

  1. Open a command prompt in the root directory.
  2. Run ./bin/run.sh <exercise> <input-directory> <output-directory>. This script will generate a representation for the solution found in <input-directory>.
  3. Once the script has completed, the representation will be written to <output-directory>/representation.txt.

Generate a representation for a solution using Docker

To generate a representation for a solution using a Docker container, follow these steps:

  1. Open a command prompt in the root directory.
  2. Run ./bin/run-in-docker.sh <exercise> <input-directory> <output-directory>. This script will:
    1. Build the representer Docker image (if necessary).
    2. Run the representer Docker image (as a container), passing the specified exercise, input-directory and output-directory arguments.
  3. Once the script has completed, the representation can be found at <output-directory>/representation.txt.