Showing 122 of 240 total issues
Class StringHelper
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
file static class StringHelper
{
/// <summary>Allocates a block of memory allocated from the unmanaged COM task allocator sufficient to hold the number of specified characters.</summary>
/// <param name="count">The number of characters, inclusive of the null terminator.</param>
/// <param name="memAllocator">The method used to allocate the memory.</param>
Method Load
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected virtual void Load(BinaryReader stream)
{
if (!stream.BaseStream.CanSeek)
throw new IOException("The base stream must support random access (seek).");
HeaderLoaded = true;
Method Enable
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static bool Enable(Harmony harmony)
{
PrefabExtensionManager.RegisterPatch(UILauncherPrefabExtension31.Movie, UILauncherPrefabExtension31.XPath, new UILauncherPrefabExtension31());
PrefabExtensionManager.RegisterPatch(UILauncherPrefabExtension32.Movie, UILauncherPrefabExtension32.XPath, new UILauncherPrefabExtension32());
PrefabExtensionManager.RegisterPatch(UILauncherPrefabExtension34.Movie, UILauncherPrefabExtension34.XPath, new UILauncherPrefabExtension34());
File NETFrameworkLoader.Hosting.cs
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
#endif
Method SendDialog
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void SendDialog(DialogType type, string title, string message, IReadOnlyList<DialogFileFilter> filters, Action<string> onResult)
{
switch (type)
{
case DialogType.Warning:
Method ReadData
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override void ReadData(BinaryReader stream, IDictionary<object, object> userdata, int totalSize)
{
int array = 1, mipmap = 1;
if (userdata.TryGetValue(KEY_ARRAY, out var arrayObj))
{
Method GetArrays
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected override DrawObject2D GetArrays(SpriteDrawData spriteDrawData)
{
if (CachedDrawObject is not null && CachedDrawData == spriteDrawData)
return CachedDrawObject;
Method ReadLine32bpp
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void ReadLine32bpp(SimpleBinaryStream input, PipelineWriter output, uint[] buffer)
{
var normalized = false;
switch (format)
{
Method BC3GradientInterpolate
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static int BC3GradientInterpolate(int index, int alpha0, int alpha1, bool isFirstGreater)
{
if (isFirstGreater)
{
switch (index)
Method TryLoadLoadOrderFromSaveFile
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static void TryLoadLoadOrderFromSaveFile(ref string[] args)
{
// If _MODULES_ arg is missing but a save file to load is specified, use the load order from the save file
var hasModules = false;
var saveFile = string.Empty;
Method ResolveHarmonyAssembly
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Assembly? ResolveHarmonyAssembly(AssemblyName assemblyName)
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
if (assembly.FullName == assemblyName.FullName)
Method Read
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override void Read(PipelineWriter output)
{
var blockWidth = Math.Max((width + 3) / 4, 1);
var blockHeight = Math.Max((height + 3) / 4, 1);
var cache0 = new byte[4][];
Method Start
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void Start()
{
_isActive = true;
switch (ThreadConfig)
Method ExecuteUpdateCheck
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[BUTRDataSourceMethod]
public void ExecuteUpdateCheck()
{
try
{
Method ReadMetadata
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override void ReadMetadata(BinaryReader stream, int totalSize)
{
var pos = stream.BaseStream.Position;
var version = stream.ReadUInt32();
stream.ReadGuid();
Method RefreshState
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected override void RefreshState()
{
base.RefreshState();
if (!OverrideDefaultStateSwitchingEnabled)
{
Method InnerSet
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static unsafe void InnerSet(string text)
{
PInvoke.EmptyClipboard();
var hGlobal = (HGLOBAL) IntPtr.Zero;
try
Method ExecuteStartGameOverride
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[BUTRDataSourceMethod(OverrideName = "ExecuteStartGame")]
public void ExecuteStartGameOverride(int mode)
{
if (ViewModel is null || ExecuteStartGame is null) return;
Method OnInitialStatePrefix
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static bool OnInitialStatePrefix(MBSubModuleBase __instance)
{
static void FailedToLoad(string message)
{
try
Method OnAssemblyResolve
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Assembly? OnAssemblyResolve(object? sender, ResolveEventArgs args)
{
if (args.Name is null) return null;
var name = new AssemblyName(args.Name);