urasandesu / Prig

Prig is a lightweight framework for test indirections in .NET Framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support ILSpy

urasandesu opened this issue · comments

When writing the test by self-hosting, I have noticed that I usually use ILSpy to find the replacement target method. In that case, I think that Prig should support to directly get the Indirection Stub Setting from ILSpy, shouldn't it?
For example, when you right click a method, a constructor and a property that is in the tree view, Get Prig Indirection Stub Setting menu is shown in the context menu:
untitled

Then, if you choose it, you get the effect same as when executing Get-IndirectionStubSetting(pget) command.

I have investigated the feasibility. ILSpy supports plugins, and CopyFullyQualifiedTypeName plugin for ILSpy has the mechanism that what I want to reference.

I created the new repository. I'm planning that it will be a Chocolatey package depending on Prig and ILSpy.

Now we released the alpha version. Hereafter, we will manage about its issues over there.

It will be nice if the Prig ILSpy plug-in was included with the install of Prig.
That will significantly simplify the step where we have to Modify Stub Settings

Umm... I don't like increasing dependencies between the packages that can run as an independent package. I guess that it will cause the side-effect that isn't good -- an increase in installation time, a problem caused by complex dependency and so on. For example, "It is unnecessary if a user might want to just write test code using the Indirection Stubs that are already prepared." or "What will happen if a user has already installed ILSpy?"

By the way, the installation step for Prig ILSpy plug-in is simple enough, isnt't it? 😅 Because you just execute the command cinst ilspy.getprigindirectionstubsetting.plugin -y to achieve it.

Most people stick with the Microsoft Fakes because their simplicity, even if it cost.
The step 3 Edit Prig Indirection Settings creates a lot of friction...

Ah, would it just be that Step 3 should be replaced by the step to use Prig ILSpy plug-in?