mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-01 11:17:18 +01:00
b2b736abc2
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
29 lines
612 B
C#
29 lines
612 B
C#
using System;
|
|
|
|
namespace Ryujinx.Tests.Unicorn
|
|
{
|
|
public class IndexedProperty<TIndex, TValue>
|
|
{
|
|
readonly Action<TIndex, TValue> SetAction;
|
|
readonly Func<TIndex, TValue> GetFunc;
|
|
|
|
public IndexedProperty(Func<TIndex, TValue> getFunc, Action<TIndex, TValue> setAction)
|
|
{
|
|
GetFunc = getFunc;
|
|
SetAction = setAction;
|
|
}
|
|
|
|
public TValue this[TIndex i]
|
|
{
|
|
get
|
|
{
|
|
return GetFunc(i);
|
|
}
|
|
set
|
|
{
|
|
SetAction(i, value);
|
|
}
|
|
}
|
|
}
|
|
}
|