PeanutButter
Loading...
Searching...
No Matches
PeanutButter.DuckTyping.Shimming.IShimSham Interface Reference

Interface to implement for shimming ducked-types. Used for the backing field within the ducked type. Could potentially be used as a starting point for new ways to duck. More...

Inheritance diagram for PeanutButter.DuckTyping.Shimming.IShimSham:
PeanutButter.DuckTyping.Shimming.DictionaryShimSham PeanutButter.DuckTyping.Shimming.ShimSham

Public Member Functions

object GetPropertyValue (string propertyName)
 Gets a property value from the underlying object.
void SetPropertyValue (string propertyName, object newValue)
 Sets a property value on the underlying object.
void CallThroughVoid (string methodName, params object[] parameters)
 Calls through to an underlying void-returning method.
object CallThrough (string methodName, object[] arguments)
 Calls through to an underlying method and returns the result.

Detailed Description

Interface to implement for shimming ducked-types. Used for the backing field within the ducked type. Could potentially be used as a starting point for new ways to duck.

Member Function Documentation

◆ CallThrough()

object PeanutButter.DuckTyping.Shimming.IShimSham.CallThrough ( string methodName,
object[] arguments )

Calls through to an underlying method and returns the result.

Parameters
methodNameName of the method to call through to
argumentsParameters to pass through to the method
Returns
Value returned from the underlying method

Implemented in PeanutButter.DuckTyping.Shimming.DictionaryShimSham, and PeanutButter.DuckTyping.Shimming.ShimSham.

◆ CallThroughVoid()

void PeanutButter.DuckTyping.Shimming.IShimSham.CallThroughVoid ( string methodName,
params object[] parameters )

Calls through to an underlying void-returning method.

Parameters
methodNameName of the method to call through to
parametersParameters to pass through to the method

Implemented in PeanutButter.DuckTyping.Shimming.DictionaryShimSham, and PeanutButter.DuckTyping.Shimming.ShimSham.

◆ GetPropertyValue()

object PeanutButter.DuckTyping.Shimming.IShimSham.GetPropertyValue ( string propertyName)

Gets a property value from the underlying object.

Parameters
propertyNameName of the property to get the value for
Returns
Value of the underlying property

Implemented in PeanutButter.DuckTyping.Shimming.DictionaryShimSham, and PeanutButter.DuckTyping.Shimming.ShimSham.

◆ SetPropertyValue()

void PeanutButter.DuckTyping.Shimming.IShimSham.SetPropertyValue ( string propertyName,
object newValue )

Sets a property value on the underlying object.

Parameters
propertyNameName of the property to set
newValueValue to set

Implemented in PeanutButter.DuckTyping.Shimming.DictionaryShimSham, and PeanutButter.DuckTyping.Shimming.ShimSham.


The documentation for this interface was generated from the following file:
  • source/Utils/PeanutButter.DuckTyping/Shimming/IShimSham.cs