diff --git a/Server/Core/Build/ClientBuilder.cs b/Server/Core/Build/ClientBuilder.cs index db6a5641..13106290 100644 --- a/Server/Core/Build/ClientBuilder.cs +++ b/Server/Core/Build/ClientBuilder.cs @@ -7,8 +7,35 @@ namespace xServer.Core.Build { + /// + /// Provides methods used to create a custom client executable. + /// public static class ClientBuilder { + /// + /// Builds a client executable. Assumes that the binaries for the client exist. + /// + /// The name of the final file. + /// The URI location of the host. + /// The password that is used to connect to the website. + /// The sub-folder to install the client. + /// Name of the installed executable. + /// The client's mutex + /// The registry key to add for running on startup. + /// Decides whether to install the client on the machine. + /// Determines whether to add the program to startup. + /// Determines whether to hide the file. + /// Determines if keylogging functionality should be activated. + /// The port the client will use to connect to the server. + /// The amount the client will wait until attempting to reconnect. + /// The installation path of the client. + /// Determines whether the client should (attempt) to obtain administrator privileges. + /// The path to the icon for the client. + /// Information about the client executable's assembly information. + /// The version number of the client. + /// Thrown if the builder was unable to rename the client executable. + /// Thrown if an invalid special folder was specified. + /// Thrown if the client binaries do not exist. public static void Build(string output, string host, string password, string installsub, string installname, string mutex, string startupkey, bool install, bool startup, bool hidefile, bool keylogger, int port, int reconnectdelay, @@ -154,11 +181,22 @@ public static class ClientBuilder IconInjector.InjectIcon(output, iconpath); } + /// + /// Obtains the OpCode that corresponds to the bool value provided. + /// + /// The value to convert to the OpCode + /// Returns the OpCode that represents the value provided. private static OpCode BoolOpcode(bool p) { return (p) ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0; } + /// + /// Attempts to obtain the signed-integer value of a special folder from the install path value provided. + /// + /// The integer value of the install path. + /// Returns the signed-integer value of the special folder. + /// Thrown if the path to the special folder was invalid. private static sbyte GetSpecialFolder(int installpath) { switch (installpath) diff --git a/Server/Core/Build/IconInjector.cs b/Server/Core/Build/IconInjector.cs index 66d22c0f..5f1f3a76 100644 --- a/Server/Core/Build/IconInjector.cs +++ b/Server/Core/Build/IconInjector.cs @@ -48,21 +48,37 @@ private struct ICONDIR [StructLayout(LayoutKind.Sequential)] private struct ICONDIRENTRY { - // Width, in pixels, of the image + /// + /// The width, in pixels, of the image. + /// public byte Width; - // Height, in pixels, of the image + /// + /// The height, in pixels, of the image. + /// public byte Height; - // Number of colors in image (0 if >=8bpp) + /// + /// The number of colors in the image; (0 if >= 8bpp) + /// public byte ColorCount; - // Reserved ( must be 0) + /// + /// Reserved (must be 0). + /// public byte Reserved; - // Color Planes + /// + /// Color planes. + /// public ushort Planes; - // Bits per pixel + /// + /// Bits per pixel. + /// public ushort BitCount; - // Length in bytes of the pixel data + /// + /// The length, in bytes, of the pixel data. + /// public int BytesInRes; - // Offset in the file where the pixel data starts. + /// + /// The offset in the file where the pixel data starts. + /// public int ImageOffset; } diff --git a/Server/Core/Build/Renamer.cs b/Server/Core/Build/Renamer.cs index 7c390ba4..5ee961f7 100644 --- a/Server/Core/Build/Renamer.cs +++ b/Server/Core/Build/Renamer.cs @@ -7,6 +7,9 @@ namespace xServer.Core.Build { public class Renamer { + /// + /// Contains the assembly definition. + /// public AssemblyDefinition AsmDef { get; set; } private int length { get; set; } @@ -30,6 +33,10 @@ public Renamer(AssemblyDefinition asmDef, int length) eventOverloaders = new Dictionary(); } + /// + /// Attempts to modify the assembly definition data. + /// + /// True if the operation succeeded; False if the operation failed. public bool Perform() { try