C# 클래스 Bloom.UrlPathString

A wrapper around string designed to reduced bugs introduced by losing track of the encoded/unencoded state of a string. It does this by requiring users to specify what they are putting in/getting out, and it keeps track.
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

공개 메소드들

메소드 설명
CreateFromHtmlXmlEncodedString ( string encoded ) : UrlPathString

In these strings, "&" would be & space would just be " "

CreateFromUnencodedString ( string unencoded, bool strictlyTreatAsEncoded = false ) : UrlPathString
CreateFromUrlEncodedString ( string encoded ) : UrlPathString

NOTE: Assumes '+' is literal. See BL-3259

Equals ( object obj ) : bool
GetFullyDecodedPath ( string directory, string &filename ) : string

Some library books have been uploaded with the cover image filename URL encoded in the file instead of HTML/XML encoded. So if the file doesn't exist, try one more level of decoding to see if that may be the problem, but preserve the original path in case an error message is still needed.

See https://silbloom.myjetbrains.com/youtrack/issue/BL-3901.

GetHashCode ( ) : int
operator ( ) : bool

보호된 메소드들

메소드 설명
Equals ( UrlPathString other ) : bool

비공개 메소드들

메소드 설명
UrlPathString ( string notEncodedString ) : System.Diagnostics

메소드 상세

CreateFromHtmlXmlEncodedString() 공개 정적인 메소드

In these strings, "&" would be & space would just be " "
public static CreateFromHtmlXmlEncodedString ( string encoded ) : UrlPathString
encoded string
리턴 UrlPathString

CreateFromUnencodedString() 공개 정적인 메소드

public static CreateFromUnencodedString ( string unencoded, bool strictlyTreatAsEncoded = false ) : UrlPathString
unencoded string
strictlyTreatAsEncoded bool
리턴 UrlPathString

CreateFromUrlEncodedString() 공개 정적인 메소드

NOTE: Assumes '+' is literal. See BL-3259
public static CreateFromUrlEncodedString ( string encoded ) : UrlPathString
encoded string
리턴 UrlPathString

Equals() 보호된 메소드

protected Equals ( UrlPathString other ) : bool
other UrlPathString
리턴 bool

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

GetFullyDecodedPath() 공개 정적인 메소드

Some library books have been uploaded with the cover image filename URL encoded in the file instead of HTML/XML encoded. So if the file doesn't exist, try one more level of decoding to see if that may be the problem, but preserve the original path in case an error message is still needed.
See https://silbloom.myjetbrains.com/youtrack/issue/BL-3901.
public static GetFullyDecodedPath ( string directory, string &filename ) : string
directory string path of the containing folder
filename string base filename to be combined with directory. This may be modified by HttpUtility.UrlDecode().
리턴 string

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

operator() 공개 정적인 메소드

public static operator ( ) : bool
리턴 bool