mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-09 09:08:39 +00: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);
|
|
}
|
|
}
|
|
}
|
|
}
|