C# Class SharpVectors.Dom.Stylesheets.MediaList

The MediaList interface provides the abstraction of an ordered collection of media, without defining or constraining how this collection is implemented. An empty list is the same as a list that contains the medium "all". The items in the MediaList are accessible via an integral index, starting from 0.
Inheritance: IMediaList
Show file Open project: codebutler/savagesvg Class Usage Examples

Public Methods

Method Description
AppendMedium ( string newMedium ) : void

Adds the medium newMedium to the end of the list. If the newMedium is already used, it is first removed.

DeleteMedium ( string oldMedium ) : void

Deletes the medium indicated by oldMedium from the list.

Matches ( MediaList inMedia ) : bool

Compares this MediaList with another and see if the second fits this

MediaList ( ) : System
MediaList ( string val ) : System
this ( ulong index ) : string

Returns the indexth in the list. If index is greater than or equal to the number of media in the list, this returns null.

Private Methods

Method Description
_clear ( ) : void
_parseString ( string mediaText ) : void

Method Details

AppendMedium() public method

Adds the medium newMedium to the end of the list. If the newMedium is already used, it is first removed.
INVALID_CHARACTER_ERR: If the medium contains characters that are invalid in the underlying style language. NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is readonly.
public AppendMedium ( string newMedium ) : void
newMedium string The new medium to add.
return void

DeleteMedium() public method

Deletes the medium indicated by oldMedium from the list.
NOT_FOUND_ERR: Raised if oldMedium is not in the list. NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is readonly.
public DeleteMedium ( string oldMedium ) : void
oldMedium string The medium to delete in the media list.
return void

Matches() public method

Compares this MediaList with another and see if the second fits this
public Matches ( MediaList inMedia ) : bool
inMedia MediaList The MediaList to compare
return bool

MediaList() public method

public MediaList ( ) : System
return System

MediaList() public method

public MediaList ( string val ) : System
val string
return System

this() public method

Returns the indexth in the list. If index is greater than or equal to the number of media in the list, this returns null.
public this ( ulong index ) : string
index ulong
return string