C# 클래스 Recipes.Contracts.FormatUtil

Pretty format utils
파일 보기 프로젝트 열기: gnschenker/RecipesWithCqrsAndEs

공개 메소드들

메소드 설명
SizeInBytes ( long sizeInBytes ) : string

Formats the size in bytes to a pretty string.

TimeOffset ( System.DateTime localTime ) : string

Displays time passed since some event expressed, displaying it as '5 days ago'.

TimeOffsetUtc ( System.DateTime dateInUtc ) : string

Displays time passed since (or remaining before) some event expressed in UTC, displaying it as '5 days ago'.

TimeSpan ( System.TimeSpan offset ) : string

Formats time span nicely

비공개 메소드들

메소드 설명
FormatUtil ( ) : System
PositiveTimeSpan ( System.TimeSpan timeSpan ) : string

메소드 상세

SizeInBytes() 공개 정적인 메소드

Formats the size in bytes to a pretty string.
public static SizeInBytes ( long sizeInBytes ) : string
sizeInBytes long The size in bytes.
리턴 string

TimeOffset() 공개 정적인 메소드

Displays time passed since some event expressed, displaying it as '5 days ago'.
public static TimeOffset ( System.DateTime localTime ) : string
localTime System.DateTime The local time.
리턴 string

TimeOffsetUtc() 공개 정적인 메소드

Displays time passed since (or remaining before) some event expressed in UTC, displaying it as '5 days ago'.
public static TimeOffsetUtc ( System.DateTime dateInUtc ) : string
dateInUtc System.DateTime The date in UTC.
리턴 string

TimeSpan() 공개 정적인 메소드

Formats time span nicely
public static TimeSpan ( System.TimeSpan offset ) : string
offset System.TimeSpan The offset.
리턴 string