src/Bannerlord.LauncherEx/Helpers/Input/OpenSaveDialogs.cs
File OpenSaveDialogs.cs
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
Method ShowDialog
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override bool ShowDialog()
{
FileNames = null;
var file = Marshal.AllocHGlobal(MAX_FILE_LENGTH * Marshal.SystemDefaultCharSize);
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 ShowDialog
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override bool ShowDialog()
{
var fileName = Marshal.ReAllocCoTaskMem(Marshal.StringToCoTaskMemUni(FileName ?? string.Empty), MAX_FILE_LENGTH);
//using var fileName = new SafeCoTaskMemString(FileName ?? string.Empty, MAX_FILE_LENGTH);
//using var fileTitle = new SafeCoTaskMemString(MAX_FILE_LENGTH);
Method Write
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static void Write(string? value, IntPtr ptr, out int byteCnt, bool nullTerm = true, CharSet charSet = CharSet.Auto, long allocatedBytes = long.MaxValue)