mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Mark properties as [CanBeNull]
This commit is contained in:
@ -4,12 +4,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using static osu.Game.Users.User;
|
using static osu.Game.Users.User;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Sections.Historical
|
namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||||
{
|
{
|
||||||
public class UserHistoryGraph : UserGraph<DateTime, long>
|
public class UserHistoryGraph : UserGraph<DateTime, long>
|
||||||
{
|
{
|
||||||
|
[CanBeNull]
|
||||||
public UserHistoryCount[] Values
|
public UserHistoryCount[] Values
|
||||||
{
|
{
|
||||||
set => Data = value?.Select(v => new KeyValuePair<DateTime, long>(v.Date, v.Count)).ToArray();
|
set => Data = value?.Select(v => new KeyValuePair<DateTime, long>(v.Date, v.Count)).ToArray();
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -79,11 +80,11 @@ namespace osu.Game.Overlays.Profile
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set of values which will be used to create a graph.
|
/// Set of values which will be used to create a graph.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[CanBeNull]
|
||||||
protected KeyValuePair<TKey, TValue>[] Data
|
protected KeyValuePair<TKey, TValue>[] Data
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
value ??= Array.Empty<KeyValuePair<TKey, TValue>>();
|
|
||||||
data = value;
|
data = value;
|
||||||
redrawGraph();
|
redrawGraph();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user