コード例 #1
0
	static ConsoleColor GetColor(UVDirectoryEntityType type)
	{
		switch (type) {
		case UVDirectoryEntityType.Directory:
			return ConsoleColor.Yellow;
		case UVDirectoryEntityType.Link:
			return ConsoleColor.Blue;
		case UVDirectoryEntityType.File:
			return ConsoleColor.White;
		}
		throw new Exception("If you encounter a new file type, please add an appropriate color!");
	}
コード例 #2
0
ファイル: UVDirectoryAsync.cs プロジェクト: txdv/LibuvSharp
    static ConsoleColor GetColor(UVDirectoryEntityType type)
    {
        switch (type)
        {
        case UVDirectoryEntityType.Directory:
            return(ConsoleColor.Yellow);

        case UVDirectoryEntityType.Link:
            return(ConsoleColor.Blue);

        case UVDirectoryEntityType.File:
            return(ConsoleColor.White);
        }
        throw new Exception("If you encounter a new file type, please add an appropriate color!");
    }