DOCUMENTATION: Added XML documentation to DiscImageChef.Server.

This commit is contained in:
2017-12-23 02:57:47 +00:00
parent c3a3caf4e2
commit b106e5d9af
13 changed files with 67 additions and 0 deletions

View File

@@ -39,6 +39,16 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class Ata public static class Ata
{ {
/// <summary>
/// Takes the ATA part of a device report and prints it as a list of values and another list of key=value pairs to be sequenced by ASP.NET in the rendering
/// </summary>
/// <param name="ataReport">ATA part of a device report</param>
/// <param name="cfa"><c>true</c> if compact flash device</param>
/// <param name="atapi"><c>true</c> if atapi device</param>
/// <param name="removable"><c>true</c> if removabledevice</param>
/// <param name="ataOneValue">List to put values on</param>
/// <param name="ataTwoValue">List to put key=value pairs on</param>
/// <param name="testedMedia">List of tested media</param>
public static void Report(ataType ataReport, bool cfa, bool atapi, ref bool removable, public static void Report(ataType ataReport, bool cfa, bool atapi, ref bool removable,
ref List<string> ataOneValue, ref Dictionary<string, string> ataTwoValue, ref List<string> ataOneValue, ref Dictionary<string, string> ataTwoValue,
ref testedMediaType[] testedMedia) ref testedMediaType[] testedMedia)

View File

@@ -38,6 +38,12 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class ScsiEvpd public static class ScsiEvpd
{ {
/// <summary>
/// Takes the SCSI EVPD part of a device report and prints it as a list key=value pairs to be sequenced by ASP.NET in the rendering
/// </summary>
/// <param name="pages">EVPD pages</param>
/// <param name="vendor">SCSI vendor string</param>
/// <param name="evpdPages">List to put the key=value pairs on</param>
public static void Report(pageType[] pages, string vendor, ref Dictionary<string, string> evpdPages) public static void Report(pageType[] pages, string vendor, ref Dictionary<string, string> evpdPages)
{ {
foreach(pageType evpd in pages) foreach(pageType evpd in pages)

View File

@@ -38,6 +38,11 @@ namespace DiscImageChef.Server.App_Start
{ {
static class ScsiInquiry static class ScsiInquiry
{ {
/// <summary>
/// Takes the SCSI INQUIRY part of a device report and prints it as a list of values to be sequenced by ASP.NET in the rendering
/// </summary>
/// <param name="inquiry">INQUIRY part of the report</param>
/// <returns>List of values</returns>
internal static List<string> Report(scsiInquiryType inquiry) internal static List<string> Report(scsiInquiryType inquiry)
{ {
List<string> scsiOneValue = new List<string>(); List<string> scsiOneValue = new List<string>();

View File

@@ -38,6 +38,11 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class ScsiMmcFeatures public static class ScsiMmcFeatures
{ {
/// <summary>
/// Takes the MMC FEATURES part of a device report and prints it as a list of values to be sequenced by ASP.NET in the rendering
/// </summary>
/// <param name="ftr">FEATURES part of the report</param>
/// <param name="mmcOneValue">List to put the values on</param>
public static void Report(mmcFeaturesType ftr, ref List<string> mmcOneValue) public static void Report(mmcFeaturesType ftr, ref List<string> mmcOneValue)
{ {
if(ftr.SupportsAACS && ftr.AACSVersionSpecified) if(ftr.SupportsAACS && ftr.AACSVersionSpecified)

View File

@@ -39,6 +39,11 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class ScsiMmcMode public static class ScsiMmcMode
{ {
/// <summary>
/// Takes the MODE PAGE 2Ah part of a device report and prints it as a list of values to be sequenced by ASP.NET in the rendering
/// </summary>
/// <param name="mode">MODE PAGE 2Ah part of the report</param>
/// <param name="mmcOneValue">List to put the values on</param>
public static void Report(mmcModeType mode, ref List<string> mmcOneValue) public static void Report(mmcModeType mode, ref List<string> mmcOneValue)
{ {
if(mode.PlaysAudio) mmcOneValue.Add("Drive can play audio"); if(mode.PlaysAudio) mmcOneValue.Add("Drive can play audio");

View File

@@ -38,6 +38,14 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class ScsiModeSense public static class ScsiModeSense
{ {
/// <summary>
/// Takes the MODE PAGEs part of a device report and prints it as a list of values and another list of key=value pairs to be sequenced by ASP.NET in the rendering
/// </summary>
/// <param name="modeSense">MODE PAGEs part of a device report</param>
/// <param name="vendor">SCSI vendor string</param>
/// <param name="deviceType">SCSI peripheral device type</param>
/// <param name="scsiOneValue">List to put values on</param>
/// <param name="modePages">List to put key=value pairs on</param>
public static void Report(modeType modeSense, string vendor, PeripheralDeviceTypes deviceType, public static void Report(modeType modeSense, string vendor, PeripheralDeviceTypes deviceType,
ref List<string> scsiOneValue, ref Dictionary<string, string> modePages) ref List<string> scsiOneValue, ref Dictionary<string, string> modePages)
{ {

View File

@@ -37,6 +37,11 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class SscTestedMedia public static class SscTestedMedia
{ {
/// <summary>
/// Takes the tested media from SCSI Streaming devices of a device report and prints it as a list of values
/// </summary>
/// <param name="mediaOneValue">List to put values on</param>
/// <param name="testedMedia">List of tested media</param>
public static void Report(IEnumerable<SequentialMedia> testedMedia, ref List<string> mediaOneValue) public static void Report(IEnumerable<SequentialMedia> testedMedia, ref List<string> mediaOneValue)
{ {
foreach(SequentialMedia media in testedMedia) foreach(SequentialMedia media in testedMedia)

View File

@@ -37,6 +37,12 @@ namespace DiscImageChef.Server.App_Start
{ {
public static class TestedMedia public static class TestedMedia
{ {
/// <summary>
/// Takes the tested media from a device report and prints it as a list of values
/// </summary>
/// <param name="ata"><c>true</c> if device report is from an ATA device</param>
/// <param name="mediaOneValue">List to put values on</param>
/// <param name="testedMedias">List of tested media</param>
public static void Report(IEnumerable<testedMediaType> testedMedias, bool ata, ref List<string> mediaOneValue) public static void Report(IEnumerable<testedMediaType> testedMedias, bool ata, ref List<string> mediaOneValue)
{ {
foreach(testedMediaType testedMedia in testedMedias) foreach(testedMediaType testedMedia in testedMedias)

View File

@@ -45,6 +45,10 @@ namespace DiscImageChef.Server.Controllers
{ {
public class UploadReportController : ApiController public class UploadReportController : ApiController
{ {
/// <summary>
/// Receives a report from DiscImageChef.Core, verifies it's in the correct format and stores it on the server
/// </summary>
/// <returns>HTTP response</returns>
[Route("api/uploadreport")] [Route("api/uploadreport")]
[HttpPost] [HttpPost]
public HttpResponseMessage UploadReport() public HttpResponseMessage UploadReport()

View File

@@ -48,6 +48,10 @@ namespace DiscImageChef.Server.Controllers
{ {
public class UploadStatsController : ApiController public class UploadStatsController : ApiController
{ {
/// <summary>
/// Receives statistics from DiscImageChef.Core, processes them and adds them to a server-side global statistics XML
/// </summary>
/// <returns>HTTP response</returns>
[Route("api/uploadstats")] [Route("api/uploadstats")]
[HttpPost] [HttpPost]
public HttpResponseMessage UploadStats() public HttpResponseMessage UploadStats()

View File

@@ -39,6 +39,9 @@ using Velyo.AspNet.Markdown;
namespace DiscImageChef.Server namespace DiscImageChef.Server
{ {
/// <summary>
/// Renders the README.md file
/// </summary>
public partial class Default : Page public partial class Default : Page
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)

View File

@@ -46,6 +46,9 @@ using PlatformID = DiscImageChef.Interop.PlatformID;
namespace DiscImageChef.Server namespace DiscImageChef.Server
{ {
/// <summary>
/// Renders a page with statistics, list of media type, devices, etc
/// </summary>
public partial class Statistics : Page public partial class Statistics : Page
{ {
class MediaItem class MediaItem

View File

@@ -46,6 +46,9 @@ using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
namespace DiscImageChef.Server namespace DiscImageChef.Server
{ {
/// <summary>
/// Renders the specified report from the server
/// </summary>
public partial class ViewReport : Page public partial class ViewReport : Page
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)