_Samples/Example_ToDo.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using ComLib;
using ComLib.Application;
namespace ComLib.Samples
{
/// <summary>
/// Example for the ToDo utility class.
/// </summary>
public class Example_ToDo : App
{
/// <summary>
/// Run the application.
/// </summary>
public override BoolMessageItem Execute()
{
// The ToDo logs all the information
// 1. priority
// 2. author
// 3. description
// 4. STACK TRACE to the log.
//
// NOTE: This is very useful alternative to using comments in the code.
// Plus this logs the stack trace(Class and Methodname) where the ToDo.MethodXXX was called from
// so you know from the logs exactly where some work needs done.
// Example 1: Log code review.
ToDo.CodeReview(ToDo.Priority.Normal, "Kishore", "Get john to review this code", ()=>
{
Console.WriteLine("My code needs review");
});
// Example 2: Log some thing that needs to be implemented.
ToDo.Implement(ToDo.Priority.High, "Kishore", "Have to finish up the Repository.Find to use dynamic objects.", () =>
{
Console.WriteLine("DynamicObject find code is incomplete.");
});
// Example 3: Log refactoring needed
ToDo.Refactor(ToDo.Priority.Low, "Kishore", "What a mess in the Reflection utils.", () =>
{
Console.WriteLine("This code is a mess, needs some refactoring.");
});
// Example 4: Log optimzation needed.
ToDo.Optimize(ToDo.Priority.Critical, "Kishore", "Multi-tenant code needs to queried from database only once.", () =>
{
Console.WriteLine("Too many queries here. Get all data in one call.");
});
// Example 5: Log bug found in code.
ToDo.BugFix(ToDo.Priority.High, "Kishore", "This is a bug related to configuration data. ", () =>
{
Console.WriteLine("Fix this code");
});
return BoolMessageItem.True;
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
