本文整理汇总了C#中ListType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ListType.ToString方法的具体用法?C# ListType.ToString怎么用?C# ListType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListType
的用法示例。
在下文中一共展示了ListType.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetListId
public virtual int GetListId(ListType listType, SchoolCategory schoolCategory)
{
switch(schoolCategory)
{
case SchoolCategory.None:
case SchoolCategory.Ungraded:
schoolCategory = SchoolCategory.HighSchool;
break;
}
return GetListId(listType.ToString(), schoolCategory);
}
示例2: BeginList
/// <summary>
/// Open a list tag
/// </summary>
/// <remarks>Sets the active tag to a new "list" tag. May only be called when
/// one of the following tags are active: "section", "paragraph", "list", "description".
/// <see cref="EndList"/> must be called to close this tag</remarks>
/// <param name="type">The type of list</param>
public void BeginList(ListType type)
{
ValidateCurrentNode("section", "paragraph", "list", "description");
_currentNode = _currentNode.AppendChild(_usage.CreateElement("list"));
_currentNode.Attributes.Append(_usage.CreateAttribute("type")).Value = type.ToString().ToLower();
}
示例3: ObjectList
public ObjectList(string _name, ListType _type)
{
name = _name;
type = _type.ToString().ToLower();
list = new List<object>();
}
示例4: GetAlbumList
/// <summary>
/// Returns a list of random, newest, highest rated etc. albums. Similar to the album lists on the home page of the Subsonic web interface.
/// </summary>
/// <param name="type">The list type. Must be one of the following: random, newest, highest, frequent, recent,alphabeticalByName,alphabeticalByArtist,starred</param>
/// <param name="size">The number of albums to return. Max 500.</param>
/// <param name="offset">The list offset. Useful if you for example want to page through the list of newest albums.</param>
/// <param name="musicFolderId">Only return albums in the music folder with the given ID. See getMusicFolders.</param>
public GetAlbumList(ListType type,string size = "10",string offset = "0",string musicFolderId = null)
: base(nameof(type), type.ToString(),
nameof(offset),offset,
nameof(musicFolderId),musicFolderId)
{
}