Skip to content

Commit

Permalink
WatchList - Fixed warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stan-Kudri committed Jul 10, 2024
1 parent 0453525 commit 963d273
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions WatchList.Core/Model/ItemCinema/WatchItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class WatchItem : IEquatable<WatchItem>
{
private const string FormatDate = "dd.MM.yyyy";

public WatchItem(string title, int sequel, StatusCinema? status, TypeCinema? type, Guid? id, DateTime? dateWatch = null, int? grade = null)
public WatchItem(string title, int sequel, StatusCinema status, TypeCinema type, Guid? id, DateTime? dateWatch = null, int? grade = null)
{
Title = string.IsNullOrEmpty(title) ? throw new ArgumentException("Invalid title format.", nameof(title)) : title;
Sequel = sequel > 0 ? sequel : throw new ArgumentException("The sequel number is greater than zero.", nameof(sequel));
Expand All @@ -36,9 +36,9 @@ private WatchItem()

public string Title { get; set; }

public TypeCinema? Type { get; set; }
public TypeCinema Type { get; set; }

public StatusCinema? Status { get; set; }
public StatusCinema Status { get; set; }

public int Sequel { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion WatchList.Core/Model/Load/ILoadRulesConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface ILoadRulesConfig

ActionDuplicateItems ActionsWithDuplicates { get; }

TypeCinema TypeCinemaLoad { get; }
TypeCinema? TypeCinemaLoad { get; }

Grade MoreGrade { get; }
}
Expand Down
2 changes: 1 addition & 1 deletion WatchList.Core/Model/SmartEnumBaseWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace WatchList.Core.Model
{
public class SmartEnumBaseWrapper<T> : Wrapper<T>
public class SmartEnumBaseWrapper<T> : Wrapper<T?>
where T : class
{
protected static ObservableCollection<TWrapper> GetItems<TWrapper>(IEnumerable<T> items, Func<T?, TWrapper> factory)
Expand Down
4 changes: 2 additions & 2 deletions WatchList.Core/Model/Sortable/SortFieldWatchItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public abstract class SortFieldWatchItem : SmartEnum<SortFieldWatchItem>, ISorta
{
public static readonly SortFieldWatchItem Title = new SortType<string>("Title", SortFields.Title, e => e.Title);
public static readonly SortFieldWatchItem Sequel = new SortType<int>("Sequel", SortFields.Sequel, e => e.Sequel);
public static readonly SortFieldWatchItem Status = new SortType<StatusCinema>("Status", SortFields.Status, e => e.Status);
public static readonly SortFieldWatchItem Status = new SortType<StatusCinema?>("Status", SortFields.Status, e => e.Status);
public static readonly SortFieldWatchItem Data = new SortType<DateTime?>("Data", SortFields.Date, e => e.Date);
public static readonly SortFieldWatchItem Grade = new SortType<int?>("Grade", SortFields.Grade, e => e.Grade);
public static readonly SortFieldWatchItem Type = new SortType<TypeCinema>("Type", SortFields.Type, e => e.Type);
public static readonly SortFieldWatchItem Type = new SortType<TypeCinema?>("Type", SortFields.Type, e => e.Type);

private SortFieldWatchItem(string name, SortFields fields)
: this(name, (int)fields)
Expand Down
3 changes: 2 additions & 1 deletion WatchList.WinForms/Control/CheckComboBox/PopupComboBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public Control DropDownControl
/// Processes Windows messages.
/// </summary>
/// <param name="m">The Windows <see cref="T:System.Windows.Forms.Message" /> to process.</param>
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
//[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]

Check warning on line 122 in WatchList.WinForms/Control/CheckComboBox/PopupComboBox.cs

View workflow job for this annotation

GitHub Actions / Lint

Single line comment should begin with a space.
[PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]

Check warning on line 123 in WatchList.WinForms/Control/CheckComboBox/PopupComboBox.cs

View workflow job for this annotation

GitHub Actions / build

'PermissionSetAttribute' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)

Check warning on line 123 in WatchList.WinForms/Control/CheckComboBox/PopupComboBox.cs

View workflow job for this annotation

GitHub Actions / build

'SecurityAction' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)

Check warning on line 123 in WatchList.WinForms/Control/CheckComboBox/PopupComboBox.cs

View workflow job for this annotation

GitHub Actions / build

'PermissionSetAttribute' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)

Check warning on line 123 in WatchList.WinForms/Control/CheckComboBox/PopupComboBox.cs

View workflow job for this annotation

GitHub Actions / build

'SecurityAction' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)
protected override void WndProc(ref Message m)
{
if (m.Msg == (NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND)
Expand Down

0 comments on commit 963d273

Please sign in to comment.