官术网_书友最值得收藏!

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "As the NuGet package names often do not match the namespaces within, the NuGet package names are mentioned separately."

A block of code is set as follows:

public class Task
{
  public int Id { get; set; }
  public string Title { get; set; }
  public int UserId { get; set; }
}
interface IService
{
  Task GetTaskById(int id);
  Task[] GetAllTasks();
  Task[] GetTasksById(int[] ids);
  Task[] GetTasksForUserId(int userId);
  Task[] GetTasksByTitle(string title);
  Task[] GetTasksByTitleForUserId(string title, int userId);
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold, as shown:

private KeyValuePair<string, string>? GetCustomAuth(IRequest httpReq)
{
  var hasCredentials = httpReq.Dto as IHasCredentials;
  if (hasCredentials == null)
  {
    return null;
  }

  var userName = hasCredentials.UserName;
  var password = hasCredentials.Password;

  if (string.IsNullOrWhiteSpace(userName) ||
      string.IsNullOrWhiteSpace(password))
   {
    return null;
    }

  return new KeyValuePair<string, string>(userName, password);
}

Any command-line input or output is written as follows:

Hello John Doe!

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "One of the key points of ServiceStack is the Code-First approach."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 公安县| 盱眙县| 林甸县| 西华县| 平乐县| 来安县| 高雄县| 昆明市| 慈利县| 南皮县| 翁牛特旗| 略阳县| 阿拉善盟| 察哈| 明溪县| 邮箱| 弋阳县| 宜川县| 陈巴尔虎旗| 江孜县| 阿拉善左旗| 饶平县| 永昌县| 保定市| 上栗县| 黑水县| 明水县| 南陵县| 永顺县| 葵青区| 海门市| 招远市| 玉溪市| 保亭| 裕民县| 张北县| 汝阳县| 涞源县| 藁城市| 揭阳市| 平定县|