小编Joh*_*n S的帖子

检查未使用的CSS样式和覆盖范围的工具?

我有一个拥有大约20个css文件的SharePoint服务器场,并且我确信它可以压缩到远远低于这个数量.但是,浏览每一页无疑会令人厌烦和愤怒.

那么有没有一个工具可以验证在网站/ webapp上使用了多少css文件?

css sharepoint

4
推荐指数
1
解决办法
1358
查看次数

AutoFac和Log4Net - 注册和使用

我已被指示在log4net旁边使用AutoFac(而不是Castle Windsor),并且在如何正确使用这些技术方面迷失了方向.

使用autofac网站上的示例我有以下LoggerModule

public class LoggingModule : Module
{
    private static void InjectLoggerProperties(object instance)
    {
        var instanceType = instance.GetType();

        // Get all the injectable properties to set.
        // If you wanted to ensure the properties were only UNSET properties,
        // here's where you'd do it.
        var properties = instanceType
          .GetProperties(BindingFlags.Public | BindingFlags.Instance)
          .Where(p => p.PropertyType == typeof(ILog) && p.CanWrite && p.GetIndexParameters().Length == 0);

        // Set the properties located.
        foreach (var propToSet in properties)
        {
            propToSet.SetValue(instance, LogManager.GetLogger(instanceType), null);
        }
    }

    private …
Run Code Online (Sandbox Code Playgroud)

model-view-controller log4net autofac

2
推荐指数
1
解决办法
3222
查看次数