<commit_before>﻿using System;
using ServiceStack.Redis;
using ServiceStack.ServiceInterface;
using ServiceStack.WebHost.Endpoints;
using ServiceStack.ServiceHost;

namespace Backbone.Todos
{
	//Register REST Paths
	[RestService("/todos")]
	[RestService("/todos/{Id}")]
	public class Todo //REST Resource DTO
	{
		public long Id { get; set; }
		public string Content { get; set; }
		public int Order { get; set; }
		public bool Done { get; set; }
	}

	//Todo REST Service implementation
	public class TodoService : RestServiceBase<Todo>
	{
		public IRedisClientsManager RedisManager { get; set; }  //Injected by IOC

		public override object OnGet(Todo request)
		{<commit_msg>explicit mention that this page contains the entire C# example<commit_after>using System;
using ServiceStack.Redis;
using ServiceStack.ServiceInterface;
using ServiceStack.WebHost.Endpoints;
using ServiceStack.ServiceHost;

//The entire C# source code for the ServiceStack + Redis TODO REST backend. There is no other .cs :)
namespace Backbone.Todos
{
	//Register REST Paths
	[RestService("/todos")]
	[RestService("/todos/{Id}")]
	public class Todo //REST Resource DTO
	{
		public long Id { get; set; }
		public string Content { get; set; }
		public int Order { get; set; }
		public bool Done { get; set; }
	}

	//Todo REST Service implementation
	public class TodoService : RestServiceBase<Todo>
	{
		public IRedisClientsManager RedisManager { get; set; }  //Injected by IOC

		public override object OnGet(Todo request)
		{
{'fraction_non_alphanumeric': 0.09860093271152565, 'fraction_numerical': 0.0, 'mean_word_length': 4.383512544802867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1344653', 'n_tokens_mistral': 494, 'n_tokens_neox': 466, 'n_words': 154}