我有一个拥有大约20个css文件的SharePoint服务器场,并且我确信它可以压缩到远远低于这个数量.但是,浏览每一页无疑会令人厌烦和愤怒.
那么有没有一个工具可以验证在网站/ webapp上使用了多少css文件?
我已被指示在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)