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

  • Mastering ServiceStack
  • Andreas Niedermair
  • 269字
  • 2021-07-09 21:27:14

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.

主站蜘蛛池模板: 四川省| 苗栗市| 金华市| 平武县| 武城县| 交口县| 青龙| 虎林市| 西和县| 方山县| 阜宁县| 盐山县| 镇雄县| 木兰县| 镇雄县| 册亨县| 库伦旗| 金溪县| 新郑市| 永顺县| 湘西| 玉山县| 九龙坡区| 马边| 康乐县| 积石山| 铁岭市| 桂林市| 仙桃市| 嘉鱼县| 五河县| 光泽县| 福安市| 永城市| 当阳市| 固镇县| 平塘县| 望谟县| 全南县| 长武县| 长顺县|