Skip to content

Commit

Permalink
♻️ publicise some parts of PB.DuckTyping for source embedding - net8.…
Browse files Browse the repository at this point in the history
…0 is stricter about method access, I think
  • Loading branch information
fluffynuts committed May 17, 2024
1 parent a43d38e commit 343d3f7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface IConverter<T1, T2> : IConverter
/// Base interface for converters of all types
/// </summary>
#if BUILD_PEANUTBUTTER_DUCKTYPING_INTERNAL
internal
public
#else
public
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace PeanutButter.DuckTyping.Shimming
/// Provides the required shimming to duck a dictionary object to an interface
/// </summary>
#if BUILD_PEANUTBUTTER_DUCKTYPING_INTERNAL
internal
public
#else
public
#endif
Expand Down
8 changes: 2 additions & 6 deletions source/Utils/PeanutButter.DuckTyping/Shimming/IShimSham.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ namespace PeanutButter.DuckTyping.Shimming
/// field within the ducked type. Could potentially be used as a starting point
/// for new ways to duck.
/// </summary>
#if BUILD_PEANUTBUTTER_DUCKTYPING_INTERNAL
internal
#else
public
#endif
interface IShimSham
// required to be public to be able to embed source
public interface IShimSham
{
/// <summary>
/// Gets a property value from the underlying object
Expand Down
8 changes: 2 additions & 6 deletions source/Utils/PeanutButter.DuckTyping/Shimming/ShimSham.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ namespace PeanutButter.DuckTyping.Shimming
/// <summary>
/// Shim to wrap objects for ducking
/// </summary>
#if BUILD_PEANUTBUTTER_DUCKTYPING_INTERNAL
internal
#else
public
#endif
class ShimSham : ShimShamBase, IShimSham
// (probably) required to be public for source embedding
public class ShimSham : ShimShamBase, IShimSham
{
// ReSharper disable once MemberCanBePrivate.Global
// ReSharper disable once InconsistentNaming
Expand Down
8 changes: 2 additions & 6 deletions source/Utils/PeanutButter.DuckTyping/Shimming/ShimShamBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ namespace PeanutButter.DuckTyping.Shimming
/// <summary>
/// Base class for common shim functionality
/// </summary>
#if BUILD_PEANUTBUTTER_DUCKTYPING_INTERNAL
internal
#else
public
#endif
abstract class ShimShamBase
// required to be public for source-embedding
public abstract class ShimShamBase
{
private static MethodInfo GetTypeMakerMethod(string name)
{
Expand Down

0 comments on commit 343d3f7

Please sign in to comment.