Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Socolin committed Apr 1, 2024
1 parent 9e8dee5 commit e55f08b
Show file tree
Hide file tree
Showing 48 changed files with 80 additions and 153 deletions.
1 change: 1 addition & 0 deletions backend/Naheulbook.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=NUnitAssertMigration/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INDENT_STYLE/@EntryValue">Space</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSORHOLDER_ON_SINGLE_LINE/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CustomTools/CustomToolsData/@EntryValue"></s:String>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

namespace Naheulbook.Core.Actions.Executor;

public interface IAddCustomModifierExecutor : IActionExecutor
{
}
public interface IAddCustomModifierExecutor : IActionExecutor;

public class AddCustomModifierExecutor(ICharacterHistoryUtil characterHistoryUtil) : IAddCustomModifierExecutor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

namespace Naheulbook.Core.Actions.Executor;

public interface IAddEaExecutor : IActionExecutor
{
}
public interface IAddEaExecutor : IActionExecutor;

public class AddEaExecutor(ICharacterHistoryUtil characterHistoryUtil) : IAddEaExecutor
{
Expand Down
12 changes: 2 additions & 10 deletions backend/src/Naheulbook.Core/Actions/Executor/AddEffectExecutor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Threading.Tasks;
using Naheulbook.Core.Exceptions;
using Naheulbook.Core.Notifications;
Expand All @@ -9,9 +8,7 @@

namespace Naheulbook.Core.Actions.Executor;

public interface IAddEffectExecutor : IActionExecutor
{
}
public interface IAddEffectExecutor : IActionExecutor;

public class AddEffectExecutor(ICharacterHistoryUtil characterHistoryUtil) : IAddEffectExecutor
{
Expand Down Expand Up @@ -95,11 +92,6 @@ INotificationSession notificationSession
}).ToList(),
};

if (context.TargetCharacter.Modifiers == null)
{
context.TargetCharacter.Modifiers = new List<CharacterModifierEntity>();
}

context.TargetCharacter.Modifiers.Add(characterModifier);

context.TargetCharacter.AddHistoryEntry(characterHistoryUtil.CreateLogAddModifier(context.TargetCharacter, characterModifier));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

namespace Naheulbook.Core.Actions.Executor;

public interface IAddEvExecutor : IActionExecutor
{
}
public interface IAddEvExecutor : IActionExecutor;

public class AddEvExecutor(ICharacterHistoryUtil characterHistoryUtil) : IAddEvExecutor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

namespace Naheulbook.Core.Actions.Executor;

public interface IAddItemExecutor : IActionExecutor
{
}
public interface IAddItemExecutor : IActionExecutor;

public class AddItemExecutor(IItemFactory itemFactory) : IAddItemExecutor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

namespace Naheulbook.Core.Actions.Executor;

public interface IRemoveItemExecutor : IActionExecutor
{
}
public interface IRemoveItemExecutor : IActionExecutor;

public class RemoveItemExecutor(IItemUtil itemUtil) : IRemoveItemExecutor
{
Expand Down
9 changes: 9 additions & 0 deletions backend/src/Naheulbook.Core/Clients/LaPageAMelkorClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Net.Http;
using System.Threading.Tasks;
using Naheulbook.Shared.Extensions;
Expand All @@ -13,6 +15,13 @@ public interface ILaPageAMelkorClient

public class LaPageAMelkorClient(HttpClient client) : ILaPageAMelkorClient
{
[Serializable]
public class Options
{
[Required]
public required string Url { get; set; }
}

public async Task<ICollection<string>> GetRandomNameAsync(string url)
{
var response = await client.GetAsync(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class EffectNotFoundException : Exception
{
}
public class EffectNotFoundException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class ForbiddenAccessException : Exception
{
}
public class ForbiddenAccessException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class GroupAlreadyInCombatException : Exception
{

}
public class GroupAlreadyInCombatException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class GroupDateNotSetException : Exception
{

}
public class GroupDateNotSetException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class GroupNotInCombatException : Exception
{

}
public class GroupNotInCombatException : Exception;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;

// ReSharper disable UnusedAutoPropertyAccessor.Local

namespace Naheulbook.Core.Exceptions;

[Serializable]
public class InvalidCustomDurationActionException(string customDurationType) : Exception
{
// ReSharper disable once UnusedMember.Local
private string CustomDurationType { get; } = customDurationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class InvalidPasswordException : Exception
{
}
public class InvalidPasswordException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class InvalidUserActivationCodeException : Exception
{
}
public class InvalidUserActivationCodeException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class NotChargeLeftOnItemException : Exception
{

}
public class NotChargeLeftOnItemException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class SpecialityNotFoundException : Exception
{

}
public class SpecialityNotFoundException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class TargetNotFoundException : Exception
{

}
public class TargetNotFoundException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Naheulbook.Core.Exceptions;

public class UserAlreadyExistsException : Exception
{
}
public class UserAlreadyExistsException : Exception;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ public interface INotificationPacket
INotificationPacketPayload Payload { get; }
}

public interface INotificationPacketPayload
{
}
public interface INotificationPacketPayload;
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace Naheulbook.Core.Services;

public interface IMonsterSubCategoryService
{
}
public interface IMonsterSubCategoryService;

public class MonsterSubCategoryService : IMonsterSubCategoryService
{
}
public class MonsterSubCategoryService : IMonsterSubCategoryService;
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#nullable enable
using System;
using System;

namespace Naheulbook.Data.Exceptions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface ICalendarRepository : IRepository<CalendarEntity>
{
}
public interface ICalendarRepository : IRepository<CalendarEntity>;

public class CalendarRepository(NaheulbookDbContext context) : Repository<CalendarEntity, NaheulbookDbContext>(context), ICalendarRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface ICharacterHistoryEntryRepository : IRepository<CharacterHistoryEntryEntity>
{
}
public interface ICharacterHistoryEntryRepository : IRepository<CharacterHistoryEntryEntity>;

public class CharacterHistoryEntryRepository(NaheulbookDbContext context) : Repository<CharacterHistoryEntryEntity, NaheulbookDbContext>(context), ICharacterHistoryEntryRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface ICharacterSkillRepository : IRepository<CharacterSkillEntity>
{
}
public interface ICharacterSkillRepository : IRepository<CharacterSkillEntity>;

public class CharacterSkillRepository(NaheulbookDbContext naheulbookDbContext) : Repository<CharacterSkillEntity, NaheulbookDbContext>(naheulbookDbContext), ICharacterSkillRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface IEffectSubCategoryRepository : IRepository<EffectSubCategoryEntity>
{
}
public interface IEffectSubCategoryRepository : IRepository<EffectSubCategoryEntity>;

public class EffectSubCategoryRepository(NaheulbookDbContext context) : Repository<EffectSubCategoryEntity, NaheulbookDbContext>(context), IEffectSubCategoryRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

namespace Naheulbook.Data.Repositories;

public interface IEffectTypeRepository : IRepository<EffectTypeEntity>
{
}
public interface IEffectTypeRepository : IRepository<EffectTypeEntity>;


public class EffectTypeRepository(NaheulbookDbContext naheulbookDbContext) : Repository<EffectTypeEntity, NaheulbookDbContext>(naheulbookDbContext), IEffectTypeRepository;
4 changes: 1 addition & 3 deletions backend/src/Naheulbook.Data/Repositories/GodRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface IGodRepository : IRepository<GodEntity>
{
}
public interface IGodRepository : IRepository<GodEntity>;

public class GodRepository(NaheulbookDbContext context) : Repository<GodEntity, NaheulbookDbContext>(context), IGodRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface IItemTypeRepository : IRepository<ItemTypeEntity>
{
}
public interface IItemTypeRepository : IRepository<ItemTypeEntity>;

public class ItemTypeRepository(NaheulbookDbContext context) : Repository<ItemTypeEntity, NaheulbookDbContext>(context), IItemTypeRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface IMonsterSubCategoryRepository : IRepository<MonsterSubCategoryEntity>
{
}
public interface IMonsterSubCategoryRepository : IRepository<MonsterSubCategoryEntity>;

public class MonsterSubCategoryRepository(NaheulbookDbContext context) : Repository<MonsterSubCategoryEntity, NaheulbookDbContext>(context), IMonsterSubCategoryRepository;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface IMonsterTraitRepository : IRepository<MonsterTraitEntity>
{
}
public interface IMonsterTraitRepository : IRepository<MonsterTraitEntity>;

public class MonsterTraitRepository(NaheulbookDbContext context) : Repository<MonsterTraitEntity, NaheulbookDbContext>(context), IMonsterTraitRepository;
4 changes: 1 addition & 3 deletions backend/src/Naheulbook.Data/Repositories/SlotRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface ISlotRepository : IRepository<SlotEntity>
{
}
public interface ISlotRepository : IRepository<SlotEntity>;

public class SlotRepository(NaheulbookDbContext context) : Repository<SlotEntity, NaheulbookDbContext>(context), ISlotRepository;
4 changes: 1 addition & 3 deletions backend/src/Naheulbook.Data/Repositories/StatRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

namespace Naheulbook.Data.Repositories;

public interface IStatRepository : IRepository<StatEntity>
{
}
public interface IStatRepository : IRepository<StatEntity>;

public class StatRepository(NaheulbookDbContext context) : Repository<StatEntity, NaheulbookDbContext>(context), IStatRepository;
Loading

0 comments on commit e55f08b

Please sign in to comment.