Showing 226 of 488 total issues
Method GenerateTXT
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void GenerateTXT()
{
CleanCache();
// Get NSWItems
Method ExecuteRestoreBackupCommand
has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring. Open
protected void ExecuteRestoreBackupCommand(object sender)
{
try {
var backup = (BackupModel)((ListView)sender).SelectedItem;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method EnumerateItems
has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring. Open
static void EnumerateItems(string id, bool recursive = false)
{
try {
foreach (var item in BL.GetListByParentID(id, true)) {
if (!recursive)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method EnumerateItems
has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring. Open
static void EnumerateItems(string id, bool recursive = false)
{
try {
foreach (var item in BL.GetListByParentID(id, true)) {
if (!recursive)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method EnumerateItems
has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring. Open
static void EnumerateItems(string id, bool recursive = false)
{
try {
foreach (var item in BL.GetListByParentID(id, true)) {
if (!recursive)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ExecuteRestoreBackupCommand
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void ExecuteRestoreBackupCommand(object sender)
{
try {
var backup = (BackupModel)((ListView)sender).SelectedItem;
Method wasNonConsumableItemPurchased
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
static async Task<bool> wasNonConsumableItemPurchased(string productID)
{
var billing = CrossInAppBilling.Current;
try
Method SetLanguage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void SetLanguage(string langCode)
{
if (string.IsNullOrEmpty(RunNameSpace))
{
throw new LocalizationException("Namespace is not set");
Method ExecuteRestorePremiumCommand
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void ExecuteRestorePremiumCommand()
{
if (restored)
{
Task.Run(async () =>
Method EncryptStringAES
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static byte[] EncryptStringAES(string plainText, string password, int reEncryptionCount, string hash, out bool ok)
{
ok = false;
byte[] bytes;
Method GenerateCleverPassword
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static string GenerateCleverPassword(string passwordPattern)
{
Random rand = new Random(DateTime.Now.Millisecond);
var generatedPassword = "";
Method GenerateTXT
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void GenerateTXT()
{
CleanCache();
// Get NSWItems
Method GenerateTXT
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void GenerateTXT()
{
CleanCache();
// Get NSWItems
Method OnElementChanged
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void OnElementChanged(ElementChangedEventArgs<FloatingActionButton> e)
{
base.OnElementChanged(e);
if (Control == null)
Method updateList
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
void updateList()
{
try {
var backupPath = PlatformSpecific.GetBackupPath();
var backupFiles = PlatformSpecific.GetFileNames(backupPath);
Method fontAdd
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
static void fontAdd(string name, string typeface, bool beginning = false)
{
if (Device.RuntimePlatform == Device.Android) {
if (typeface != null) {
typeface = typeface + fontExtension + "#" + typeface;
Method ExecuteThemeSelectedCommand
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void ExecuteThemeSelectedCommand(string selectedTheme)
{
string themeCode = null;
if (!string.IsNullOrEmpty(selectedTheme) && string.Compare(selectedTheme, TR.Cancel) != 0) {
Method GetItemMenu
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
static Grid GetItemMenu()
{
var itemEditLayout = new Grid {
BackgroundColor = Theme.Current.AppHeaderBackground,
HorizontalOptions = LayoutOptions.FillAndExpand,
Method ExecuteOpenMenuCommand
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void ExecuteOpenMenuCommand(object item)
{
if (item != null) {
var itemMdl = (ItemModel)item;
if (itemMdl.IconID != premadeIconIdentifier) {
Method CreateLabel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void CreateLabel()
{
var popup = new EntryPopup(TR.Tr("create_label"), null, false);
popup.PopupClosed += (o, closedArgs) => {
if (closedArgs.OkClicked) {