src/NUnit/Core/src/TaskTests/TaskTestCaseBlockMember.cs
/// <summary>
/// Sets <paramref name="taskTestsInstance"/> as value of
/// <see cref="MemberInfo"/>. After that it is stored to
/// <see cref="Instance"/> too.
/// </summary>
/// <param name="taskTestsInstance">The new instance.</param>
Sets  as value of
. After that it is stored to
too.
Sets as value of . After that it is stored to too .
public void SetInstance(ITaskTestCaseBlock taskTestsInstance)
        {
            if (MemberInfo.MemberType == MemberTypes.Field) {
                ((FieldInfo)MemberInfo).SetValue(null, taskTestsInstance);
            } else {
                ((PropertyInfo)MemberInfo).SetValue(null, taskTestsInstance);
            }
            Instance = taskTestsInstance;
        }
public void SetInstance ( ITaskTestCaseBlock taskTestsInstance ) { if ( MemberInfo . MemberType == MemberTypes . Field ) { ( ( FieldInfo ) MemberInfo ) . SetValue ( null , taskTestsInstance ) ; } else { ( ( PropertyInfo ) MemberInfo ) . SetValue ( null , taskTestsInstance ) ; } Instance = taskTestsInstance ; }
Sets  as value of
.
Sets as value of .
taskTestsInstance
ITaskTestCaseBlock
The new instance.
The new instance .