English 中文(简体)
Tell Resharper 用于对未使用的班级进行检查。
原标题:Tell Resharper to use spring.net DI configuration for the inspection of unused classes?

在我从未使用过部分法典时,令我痛心;这非常有益。

然而,我有几门没有直接参考的其他法典的班子。 这些课程仅用于依赖注射组合。

I use spring.net for DI. The DI configuration is in xml format.

我是否可以告诉Resharper如何利用DI档案检查未使用的班级?

我知道,我能够用诸如:

// ReSharper disable UnusedMember.Global
public class TheClass : IInterfaceWiredUsingSpringDI
// ReSharper restore UnusedMember.Global

但我不喜欢这么多——难以阅读,我实际上不想压制警告。

<>注:

我在上发现,用于镇压警报的侵扰性较小且可读性更强。 当你界定这一习俗时:

[MeansImplicitUse]
public class IoCAttribute : Attribute { }

然后,你可以压制警告:

[IoC]
public class TheClass : IInterfaceWiredUsingSpringDI 
最佳回答

I don t believe so. Spent a bit of time trying to solve a similar frustration with IOC and ReSharper to no avail, just doesn t facilitate it as far as I can tell.

问题回答

我3年太晚才回答这个问题,但我刚刚通过“ReSharper s twitter”来看待这个问题。 我为ReSharper创造了一个称为:Agent Mulder,确切地说,这是:alyzes IoC集装箱登记,并允许通过集装箱登记的各类物品浏览和发现使用!

https://i.imgur.com/xjYrT.png” alt=">

辅助集装箱清单请访问项目wiki

(令人欣慰的是,它没有与春季合作。) NET,因为对它没有需求,担心:





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签