IO/FileHelper.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Reflection;
using ComLib;
using ComLib.Arguments;
using ComLib.Application;
namespace ComLib.IO
{
/// <summary>
/// Stores command line arguments for LicenseApplier
/// </summary>
public class LicenseArgs : FileCleanArgs
{
/// <summary>
/// Path to the license file
/// </summary>
[Arg("licensefile", "l", "license.txt - Name of the file to get text to append to next one.", typeof(string), true, "license.txt", "license.txt")]
public string LicenseFile { get; set; }
/// <summary>
/// Whether or not the check files for existing license
/// </summary>
[Arg("checklicense", "l", "Check for existing license before applying.", typeof(string), true, true, "true", "true|false")]
public bool CheckLicenseFirst { get; set; }
}
/// <summary>
/// Applies a license by prepending it to each *.cs file.
/// </summary>
public class LicenseApplier : FileAppBase
{
private LicenseArgs _args = null;
private string _license;
private StringBuilder _buffer = new StringBuilder();
/// <summary>
/// File Cleaner.
/// </summary>
public LicenseApplier()
{
Settings.ArgsReciever = new LicenseArgs();
Settings.ArgsRequired = true;
Settings.ArgsAppliedToReciever = true;
_license = string.Empty;
}
#region IShellCommand Members
/// <summary>
/// Execute cleaning of files/directories.
后面还有 46 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
