Merge remote-tracking branch 'remotes/origin/AOPSample'
# Conflicts: # src/AutofacWihtAOP/AutofacWihtAOP/AutofacWihtAOP.csproj # src/AutofacWihtAOP/AutofacWihtAOP/AutofacWithAOP.csproj # src/AutofacWihtAOP/AutofacWihtAOP/ILogService.cs # src/AutofacWihtAOP/AutofacWihtAOP/LogFilter.cs # src/AutofacWihtAOP/AutofacWihtAOP/LogInterceptor.cs # src/AutofacWihtAOP/AutofacWihtAOP/Program.cs # src/AutofacWihtAOP/AutofacWihtAOP/UserService.cs # src/AutofacWihtAOP/AutofacWihtAOP/packages.config # src/IoC/IoC.sln.DotSettings.user # src/IoC_Inject/IoC_Inject/IoC_Inject.csproj
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -8,3 +8,5 @@ project.lock.json
|
||||
/**/.idea
|
||||
/src/packages
|
||||
/src/CsvHelper.Excel.userprefs
|
||||
/src/AutofacWihtAOP/packages
|
||||
/src/IoC/packages
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.9.4.0" newVersion="4.9.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>AutofacWithAOP</RootNamespace>
|
||||
<AssemblyName>AutofacWithAOP</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -34,79 +33,48 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac, Version=4.0.1.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.4.0.1\lib\net45\Autofac.dll</HintPath>
|
||||
<Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Extras.DynamicProxy, Version=4.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.Extras.DynamicProxy.4.5.0\lib\net45\Autofac.Extras.DynamicProxy.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Integration.WebApi, Version=4.2.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.WebApi2.4.2.0\lib\net45\Autofac.Integration.WebApi.dll</HintPath>
|
||||
<Reference Include="Autofac.Extras.DynamicProxy, Version=4.1.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.Extras.DynamicProxy.4.1.0\lib\net45\Autofac.Extras.DynamicProxy.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentValidation, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7de548da2fbae0f0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentValidation.8.1.3\lib\net45\FluentValidation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Bson, Version=2.7.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Bson.2.7.3\lib\net45\MongoDB.Bson.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\FluentValidation.8.5.0\lib\net45\FluentValidation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Annotations.4.4.1\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.ComponentModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Primitives.4.3.0\lib\net45\System.ComponentModel.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.0\lib\net45\System.Web.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Xuenn.Lib.CommonUtility">
|
||||
<HintPath>libs\Xuenn.Lib.CommonUtility.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CacheInterceptor.cs" />
|
||||
<Compile Include="FieldAttribute.cs" />
|
||||
<Compile Include="FunctionAttribute.cs" />
|
||||
<Compile Include="ILogService.cs" />
|
||||
<Compile Include="IPerson.cs" />
|
||||
<Compile Include="ITimeService.cs" />
|
||||
<Compile Include="IUserService.cs" />
|
||||
<Compile Include="LogFilter.cs" />
|
||||
<Compile Include="LogInterceptor.cs" />
|
||||
<Compile Include="LogModel.cs" />
|
||||
<Compile Include="LogService.cs" />
|
||||
<Compile Include="Person.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TimeService.cs" />
|
||||
<Compile Include="UserModel.cs" />
|
||||
<Compile Include="UserService.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
36
src/AutofacWihtAOP/AutofacWihtAOP/CacheInterceptor.cs
Normal file
36
src/AutofacWihtAOP/AutofacWihtAOP/CacheInterceptor.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using Castle.DynamicProxy;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public class CacheInterceptor : IInterceptor
|
||||
{
|
||||
public string Data { get; set; }
|
||||
private ITimeService _timeService;
|
||||
public CacheInterceptor(ITimeService s)
|
||||
{
|
||||
|
||||
_timeService = s;
|
||||
}
|
||||
|
||||
public void Intercept(IInvocation invocation)
|
||||
{
|
||||
var key = invocation.GetConcreteMethod().Name;
|
||||
var time = CallContext.GetData(key)?.ToString();
|
||||
if (time == null)
|
||||
{
|
||||
Console.WriteLine("Set Cache Time");
|
||||
//如果沒有快取 執行呼叫Service
|
||||
invocation.Proceed();
|
||||
CallContext.SetData(key, invocation.ReturnValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
//如果有快取直接取值
|
||||
Console.WriteLine("Get Time From Cache");
|
||||
invocation.ReturnValue = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using AutofacWihtAOP;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public interface ILogService
|
||||
{
|
||||
AuditLogModel GetLastLog(LogFilter filter);
|
||||
void AddLog(AuditLogModel model);
|
||||
string GetLastLog(LogFilter filter);
|
||||
void AddLog(string message);
|
||||
}
|
||||
}
|
||||
7
src/AutofacWihtAOP/AutofacWihtAOP/IPerson.cs
Normal file
7
src/AutofacWihtAOP/AutofacWihtAOP/IPerson.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public interface IPerson
|
||||
{
|
||||
string SaySomething();
|
||||
}
|
||||
}
|
||||
7
src/AutofacWihtAOP/AutofacWihtAOP/ITimeService.cs
Normal file
7
src/AutofacWihtAOP/AutofacWihtAOP/ITimeService.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public interface ITimeService
|
||||
{
|
||||
string GetTime();
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,9 @@
|
||||
using AutofacWihtAOP;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public class LogFilter
|
||||
{
|
||||
public string FunctionName { get; set; }
|
||||
public string FieldName { get; set; }
|
||||
public string UserCode { get; set; }
|
||||
|
||||
public bool LogCondition(AuditLogModel x)
|
||||
{
|
||||
return x.FieldName == FieldName &&
|
||||
x.FunctionName == FunctionName &&
|
||||
x.UserCode == UserCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,115 +3,26 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using AutofacWihtAOP;
|
||||
using Castle.DynamicProxy;
|
||||
using Xuenn.Lib.CommonUtility.Interceptors;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
|
||||
public class LogInterceptor : InterceptorBase
|
||||
public class LogInterceptor : IInterceptor
|
||||
{
|
||||
public string Data { get; set; }
|
||||
public string Data1 { get; set; }
|
||||
private ILogService _logService;
|
||||
|
||||
public LogInterceptor(ILogService logservice)
|
||||
public LogInterceptor(ILogService logService)
|
||||
{
|
||||
_logService = logservice;
|
||||
_logService = logService;
|
||||
}
|
||||
|
||||
protected override void OnExcuted(IInvocation invocation)
|
||||
public void Intercept(IInvocation invocation)
|
||||
{
|
||||
var models = invocation.Arguments.Where(Ext.IsAttributeType<FunctionAttribute>);
|
||||
|
||||
var props = models.SelectMany(x => x.GetType().GetPropertiesBy<FieldAttribute>(),
|
||||
(model, prop) => new
|
||||
{
|
||||
CurrentValue = prop.GetValue(model),
|
||||
FieldName = prop
|
||||
.GetAttributeValue((FieldAttribute attr) => attr.Name),
|
||||
functionName = model.GetType()
|
||||
.GetAttributeValue((FunctionAttribute attr) => attr.FunctionName)
|
||||
});
|
||||
|
||||
foreach (var prop in props)
|
||||
{
|
||||
|
||||
AuditLogModel lastLog = _logService.GetLastLog(new LogFilter()
|
||||
{
|
||||
FieldName = prop.FieldName,
|
||||
FunctionName = prop.functionName,
|
||||
UserCode = "Dnaiel"
|
||||
});
|
||||
|
||||
AuditLogModel logModel = new AuditLogModel()
|
||||
{
|
||||
UserCode = "Dnaiel",
|
||||
FunctionName = prop.functionName,
|
||||
FieldName = prop.FieldName,
|
||||
NewValue = prop.CurrentValue?.ToString(),
|
||||
OldValue = lastLog != null ? lastLog.NewValue :string.Empty
|
||||
};
|
||||
|
||||
if (logModel?.NewValue != logModel.OldValue)
|
||||
_logService.AddLog(logModel);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class Ext
|
||||
{
|
||||
public static IEnumerable<PropertyInfo> GetPropertiesBy<T>
|
||||
(this Type type,bool inherit = true)
|
||||
where T : Attribute
|
||||
{
|
||||
if (type == null)
|
||||
throw new Exception("type can't be null");
|
||||
|
||||
|
||||
return type.GetProperties()
|
||||
.Where(x => x.GetCustomAttribute<T>(inherit) != null);
|
||||
}
|
||||
|
||||
public static bool IsAttributeType<TAttr>(this object obj)
|
||||
where TAttr : Attribute
|
||||
{
|
||||
return IsAttributeType<TAttr>(obj, true);
|
||||
}
|
||||
|
||||
public static bool IsAttributeType<TAttr>(this object obj,bool inherit)
|
||||
where TAttr : Attribute
|
||||
{
|
||||
return obj.GetType()
|
||||
.GetCustomAttribute<TAttr>(inherit) != null;
|
||||
}
|
||||
|
||||
public static TRtn GetAttributeValue<TAttr, TRtn>(this PropertyInfo prop,
|
||||
Func<TAttr,TRtn> selector)
|
||||
where TAttr : Attribute
|
||||
{
|
||||
TRtn result = default(TRtn);
|
||||
|
||||
var attr = prop.GetCustomAttribute<TAttr>();
|
||||
|
||||
if (selector == null || attr == null)
|
||||
return result;
|
||||
|
||||
return selector(attr);
|
||||
}
|
||||
|
||||
public static TRtn GetAttributeValue<TAttr, TRtn>(this Type prop,
|
||||
Func<TAttr, TRtn> selector)
|
||||
where TAttr : Attribute
|
||||
{
|
||||
TRtn result = default(TRtn);
|
||||
|
||||
var attr = prop.GetCustomAttribute<TAttr>();
|
||||
|
||||
if (selector == null || attr == null)
|
||||
return result;
|
||||
|
||||
return selector(attr);
|
||||
Console.WriteLine("LogInterceptor Start");
|
||||
invocation.Proceed();
|
||||
Console.WriteLine("LogInterceptor End");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace AutofacWihtAOP
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public class AuditLogModel
|
||||
{
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AutofacWihtAOP;
|
||||
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public class LogService : ILogService
|
||||
{
|
||||
List<AuditLogModel> _list = new List<AuditLogModel>();
|
||||
|
||||
public AuditLogModel GetLastLog(LogFilter filter)
|
||||
public void AddLog(string message)
|
||||
{
|
||||
return _list.OrderBy(x => x.CreateDate)
|
||||
.FirstOrDefault(filter.LogCondition);
|
||||
|
||||
}
|
||||
|
||||
public void AddLog(AuditLogModel model)
|
||||
string ILogService.GetLastLog(LogFilter filter)
|
||||
{
|
||||
_list.Add(model);
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
src/AutofacWihtAOP/AutofacWihtAOP/Person.cs
Normal file
15
src/AutofacWihtAOP/AutofacWihtAOP/Person.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using Autofac.Extras.DynamicProxy;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
[Intercept(typeof(CacheInterceptor))]
|
||||
[Intercept(typeof(LogInterceptor))]
|
||||
public class Person : IPerson
|
||||
{
|
||||
public string SaySomething()
|
||||
{
|
||||
return DateTime.Now.ToLongTimeString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,74 +1,21 @@
|
||||
using System;
|
||||
using System.CodeDom;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlTypes;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Autofac;
|
||||
using Autofac.Builder;
|
||||
using Autofac.Core;
|
||||
using Autofac.Extras.DynamicProxy;
|
||||
using Castle.DynamicProxy;
|
||||
using static System.Convert;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public interface ITimeService
|
||||
{
|
||||
string GetTime();
|
||||
}
|
||||
|
||||
public class TimeService : ITimeService
|
||||
{
|
||||
public string GetTime()
|
||||
{
|
||||
return DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");
|
||||
}
|
||||
}
|
||||
|
||||
public class TimeInterceptor : IInterceptor
|
||||
{
|
||||
private ITimeService _timeService;
|
||||
public TimeInterceptor(ITimeService s)
|
||||
{
|
||||
|
||||
_timeService = s;
|
||||
}
|
||||
|
||||
public void Intercept(IInvocation invocation)
|
||||
{
|
||||
var time = CallContext.GetData("time")?.ToString();
|
||||
if (time == null)
|
||||
{
|
||||
//如果沒有快取 執行呼叫Service
|
||||
invocation.Proceed();
|
||||
CallContext.SetData("time", invocation.ReturnValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
//如果有快取直接取值
|
||||
invocation.ReturnValue = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Intercept(typeof(TimeInterceptor))]
|
||||
public class Person : IPerson
|
||||
{
|
||||
public string SaySomething()
|
||||
{
|
||||
return DateTime.Now.ToLongTimeString();
|
||||
}
|
||||
}
|
||||
|
||||
public interface IPerson
|
||||
{
|
||||
string SaySomething();
|
||||
}
|
||||
|
||||
|
||||
class Program
|
||||
{
|
||||
|
||||
@@ -79,19 +26,11 @@ namespace AutofacWithAOP
|
||||
|
||||
IPerson person = container.Resolve<IPerson>();
|
||||
|
||||
//Console.WriteLine(person.SaySomething());
|
||||
//Thread.Sleep(5000);
|
||||
//Console.WriteLine(person.SaySomething());
|
||||
Console.WriteLine(person.SaySomething());
|
||||
Thread.Sleep(5000);
|
||||
Console.WriteLine(person.SaySomething());
|
||||
|
||||
IUserService personService = container.Resolve<IUserService>();
|
||||
|
||||
personService.ModifyUserInfo(new UserModel()
|
||||
{
|
||||
Birthday = DateTime.Now,
|
||||
Phone = "0911181212"
|
||||
});
|
||||
|
||||
|
||||
personService.ModifyUserInfo(new UserModel()
|
||||
{
|
||||
Birthday = DateTime.Now,
|
||||
@@ -105,26 +44,65 @@ namespace AutofacWithAOP
|
||||
{
|
||||
var builder = new ContainerBuilder();
|
||||
|
||||
builder.RegisterType<TimeInterceptor>(); //註冊攔截器
|
||||
builder.RegisterType<LogInterceptor>(); //註冊攔截器
|
||||
//將Assembly所有實現IInterceptor註冊入IOC容器中
|
||||
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
|
||||
.AssignableTo(typeof(IInterceptor));
|
||||
|
||||
builder.RegisterType<Person>()
|
||||
.As<IPerson>()
|
||||
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
|
||||
.AsImplementedInterfaces()
|
||||
.EnableInterfaceInterceptors();
|
||||
|
||||
builder.RegisterType<LogService>()
|
||||
.As<ILogService>().SingleInstance()
|
||||
.EnableInterfaceInterceptors();
|
||||
|
||||
builder.RegisterType<UserService>()
|
||||
.As<IUserService>()
|
||||
.EnableInterfaceInterceptors();
|
||||
|
||||
|
||||
//註冊時間Service
|
||||
builder.RegisterType<TimeService>().As<ITimeService>();
|
||||
//builder.RegisterType<UserService>()
|
||||
// .As<IUserService>()
|
||||
// .InterceptedBy(builder,
|
||||
// new
|
||||
// InterceptionData() { InterceptionType = typeof(LogInterceptor) },
|
||||
// new InterceptionData(){ InterceptionType = typeof(CacheInterceptor) });
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
}
|
||||
|
||||
public class InterceptionData
|
||||
{
|
||||
public Type InterceptionType { get; set; }
|
||||
public IEnumerable<Parameter> Parameters { get; set; } = new List<Parameter>();
|
||||
}
|
||||
|
||||
public static class InterceptionExtensions
|
||||
{
|
||||
public static IRegistrationBuilder<TLimit, ConcreteReflectionActivatorData, TRegistrationStyle>
|
||||
InterceptedBy<TLimit, TRegistrationStyle>(
|
||||
this IRegistrationBuilder<TLimit, ConcreteReflectionActivatorData, TRegistrationStyle> registration,
|
||||
ContainerBuilder builder,
|
||||
params InterceptionData[] datas)
|
||||
{
|
||||
|
||||
registration.EnableInterception();
|
||||
|
||||
var interceptions = datas.Where(x => typeof(IInterceptor).IsAssignableFrom(x.InterceptionType));
|
||||
|
||||
registration.InterceptedBy(interceptions.Select(x => x.InterceptionType.FullName).ToArray());
|
||||
|
||||
foreach (var data in datas)
|
||||
{
|
||||
builder.RegisterType(data.InterceptionType)
|
||||
.WithProperties(data.Parameters)
|
||||
.Named<IInterceptor>(data.InterceptionType.FullName);
|
||||
}
|
||||
|
||||
return registration;
|
||||
}
|
||||
|
||||
private static void EnableInterception<TLimit, TRegistrationStyle>(this IRegistrationBuilder<TLimit, ConcreteReflectionActivatorData, TRegistrationStyle> registration)
|
||||
{
|
||||
//判斷註冊type是否是Interface
|
||||
if (registration.RegistrationData
|
||||
.Services
|
||||
.OfType<IServiceWithType>().Any(x => x.ServiceType.IsInterface))
|
||||
registration.EnableInterfaceInterceptors();
|
||||
else
|
||||
registration.EnableClassInterceptors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// 組件的一般資訊是由下列的屬性集控制。
|
||||
// 變更這些屬性的值即可修改組件的相關
|
||||
// 資訊。
|
||||
[assembly: AssemblyTitle("AutofacWihtAOP")]
|
||||
[assembly: AssemblyTitle("AutofacWithAOP")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("HP Inc.")]
|
||||
[assembly: AssemblyProduct("AutofacWihtAOP")]
|
||||
[assembly: AssemblyProduct("AutofacWithAOP")]
|
||||
[assembly: AssemblyCopyright("Copyright © HP Inc. 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
12
src/AutofacWihtAOP/AutofacWihtAOP/TimeService.cs
Normal file
12
src/AutofacWihtAOP/AutofacWihtAOP/TimeService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
public class TimeService : ITimeService
|
||||
{
|
||||
public string GetTime()
|
||||
{
|
||||
return DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,13 @@ using Autofac.Extras.DynamicProxy;
|
||||
|
||||
namespace AutofacWithAOP
|
||||
{
|
||||
[Intercept(typeof(CacheInterceptor))]
|
||||
[Intercept(typeof(LogInterceptor))]
|
||||
public class UserService:IUserService
|
||||
{
|
||||
public void ModifyUserInfo(UserModel model)
|
||||
public virtual void ModifyUserInfo(UserModel model)
|
||||
{
|
||||
Console.WriteLine("User was modified");
|
||||
Console.WriteLine("UserService Value");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="4.0.1" targetFramework="net452" />
|
||||
<package id="Autofac.Extras.DynamicProxy" version="4.5.0" targetFramework="net452" />
|
||||
<package id="Autofac.WebApi2" version="4.2.0" targetFramework="net462" />
|
||||
<package id="Castle.Core" version="4.3.1" targetFramework="net452" />
|
||||
<package id="FluentValidation" version="8.1.3" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.0" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.0" targetFramework="net462" />
|
||||
<package id="MongoDB.Bson" version="2.7.3" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net462" />
|
||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net462" />
|
||||
<package id="System.ComponentModel.Annotations" version="4.4.1" targetFramework="net462" />
|
||||
<package id="System.ComponentModel.Primitives" version="4.3.0" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="Autofac" version="4.9.4" targetFramework="net452" />
|
||||
<package id="Autofac.Extras.DynamicProxy" version="4.1.0" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net452" />
|
||||
<package id="FluentValidation" version="8.5.0" targetFramework="net452" />
|
||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.ComponentModel.Annotations" version="4.6.0" targetFramework="net452" />
|
||||
<package id="System.ComponentModel.Primitives" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
|
||||
</packages>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,212 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Autofac.Extras.DynamicProxy</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Autofac.Extras.DynamicProxy.InterceptAttribute">
|
||||
<summary>
|
||||
Indicates that a type should be intercepted.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.InterceptAttribute.InterceptorService">
|
||||
<summary>
|
||||
Gets the interceptor service.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.InterceptAttribute.#ctor(Autofac.Core.Service)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Autofac.Extras.DynamicProxy.InterceptAttribute"/> class.
|
||||
</summary>
|
||||
<param name="interceptorService">The interceptor service.</param>
|
||||
<exception cref="T:System.ArgumentNullException">
|
||||
Thrown if <paramref name="interceptorService" /> is <see langword="null" />.
|
||||
</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.InterceptAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Autofac.Extras.DynamicProxy.InterceptAttribute"/> class.
|
||||
</summary>
|
||||
<param name="interceptorServiceName">Name of the interceptor service.</param>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.InterceptAttribute.#ctor(System.Type)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Autofac.Extras.DynamicProxy.InterceptAttribute"/> class.
|
||||
</summary>
|
||||
<param name="interceptorServiceType">The typed interceptor service.</param>
|
||||
</member>
|
||||
<member name="T:Autofac.Extras.DynamicProxy.RegistrationExtensions">
|
||||
<summary>
|
||||
Adds registration syntax to the <see cref="T:Autofac.ContainerBuilder"/> type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``2(Autofac.Builder.IRegistrationBuilder{``0,Autofac.Features.Scanning.ScanningActivatorData,``1})">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2})">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TConcreteReflectionActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``2(Autofac.Builder.IRegistrationBuilder{``0,Autofac.Features.Scanning.ScanningActivatorData,``1},Castle.DynamicProxy.ProxyGenerationOptions,System.Type[])">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<param name="additionalInterfaces">Additional interface types. Calls to their members will be proxied as well.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Castle.DynamicProxy.ProxyGenerationOptions,System.Type[])">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TConcreteReflectionActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<param name="additionalInterfaces">Additional interface types. Calls to their members will be proxied as well.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableInterfaceInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2})">
|
||||
<summary>
|
||||
Enable interface interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or interface, or added with InterceptedBy() calls.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TSingleRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableInterfaceInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Castle.DynamicProxy.ProxyGenerationOptions)">
|
||||
<summary>
|
||||
Enable interface interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or interface, or added with InterceptedBy() calls.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TSingleRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptedBy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Autofac.Core.Service[])">
|
||||
<summary>
|
||||
Allows a list of interceptor services to be assigned to the registration.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TStyle">Registration style.</typeparam>
|
||||
<param name="builder">Registration to apply interception to.</param>
|
||||
<param name="interceptorServices">The interceptor services.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="builder"/> or <paramref name="interceptorServices"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptedBy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},System.String[])">
|
||||
<summary>
|
||||
Allows a list of interceptor services to be assigned to the registration.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TStyle">Registration style.</typeparam>
|
||||
<param name="builder">Registration to apply interception to.</param>
|
||||
<param name="interceptorServiceNames">The names of the interceptor services.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="builder"/> or <paramref name="interceptorServiceNames"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptedBy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},System.Type[])">
|
||||
<summary>
|
||||
Allows a list of interceptor services to be assigned to the registration.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TStyle">Registration style.</typeparam>
|
||||
<param name="builder">Registration to apply interception to.</param>
|
||||
<param name="interceptorServiceTypes">The types of the interceptor services.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="builder"/> or <paramref name="interceptorServiceTypes"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptTransparentProxy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},System.Type[])">
|
||||
<summary>
|
||||
Intercepts the interface of a transparent proxy (such as WCF channel factory based clients).
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TSingleRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptTransparentProxy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Castle.DynamicProxy.ProxyGenerationOptions,System.Type[])">
|
||||
<summary>
|
||||
Intercepts the interface of a transparent proxy (such as WCF channel factory based clients).
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TSingleRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<param name="additionalInterfacesToProxy">Additional interface types. Calls to their members will be proxied as well.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="T:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.InterfaceNotSupportedByTransparentProxy">
|
||||
<summary>
|
||||
Looks up a localized string similar to The transparent proxy does not support the additional interface(s): {0}..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.InterfaceProxyingOnlySupportsInterfaceServices">
|
||||
<summary>
|
||||
Looks up a localized string similar to The component {0} cannot use interface interception as it provides services that are not publicly visible interfaces. Check your registration of the component to ensure you're not enabling interception and registering it as an internal/private interface type..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.TransparentProxyIsNotInterface">
|
||||
<summary>
|
||||
Looks up a localized string similar to The transparent proxy of type '{0}' must be an interface..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.TypeIsNotTransparentProxy">
|
||||
<summary>
|
||||
Looks up a localized string similar to The instance of type '{0}' is not a transparent proxy..
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,189 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Autofac.Extras.DynamicProxy</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Autofac.Extras.DynamicProxy.InterceptAttribute">
|
||||
<summary>
|
||||
Indicates that a type should be intercepted.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.InterceptAttribute.InterceptorService">
|
||||
<summary>
|
||||
Gets the interceptor service.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.InterceptAttribute.#ctor(Autofac.Core.Service)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Autofac.Extras.DynamicProxy.InterceptAttribute"/> class.
|
||||
</summary>
|
||||
<param name="interceptorService">The interceptor service.</param>
|
||||
<exception cref="T:System.ArgumentNullException">
|
||||
Thrown if <paramref name="interceptorService" /> is <see langword="null" />.
|
||||
</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.InterceptAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Autofac.Extras.DynamicProxy.InterceptAttribute"/> class.
|
||||
</summary>
|
||||
<param name="interceptorServiceName">Name of the interceptor service.</param>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.InterceptAttribute.#ctor(System.Type)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Autofac.Extras.DynamicProxy.InterceptAttribute"/> class.
|
||||
</summary>
|
||||
<param name="interceptorServiceType">The typed interceptor service.</param>
|
||||
</member>
|
||||
<member name="T:Autofac.Extras.DynamicProxy.RegistrationExtensions">
|
||||
<summary>
|
||||
Adds registration syntax to the <see cref="T:Autofac.ContainerBuilder"/> type.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``2(Autofac.Builder.IRegistrationBuilder{``0,Autofac.Features.Scanning.ScanningActivatorData,``1})">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2})">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TConcreteReflectionActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``2(Autofac.Builder.IRegistrationBuilder{``0,Autofac.Features.Scanning.ScanningActivatorData,``1},Castle.DynamicProxy.ProxyGenerationOptions,System.Type[])">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<param name="additionalInterfaces">Additional interface types. Calls to their members will be proxied as well.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableClassInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Castle.DynamicProxy.ProxyGenerationOptions,System.Type[])">
|
||||
<summary>
|
||||
Enable class interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or added with InterceptedBy().
|
||||
Only virtual methods can be intercepted this way.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TConcreteReflectionActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<param name="additionalInterfaces">Additional interface types. Calls to their members will be proxied as well.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableInterfaceInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2})">
|
||||
<summary>
|
||||
Enable interface interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or interface, or added with InterceptedBy() calls.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TSingleRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.EnableInterfaceInterceptors``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Castle.DynamicProxy.ProxyGenerationOptions)">
|
||||
<summary>
|
||||
Enable interface interception on the target type. Interceptors will be determined
|
||||
via Intercept attributes on the class or interface, or added with InterceptedBy() calls.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TSingleRegistrationStyle">Registration style.</typeparam>
|
||||
<param name="registration">Registration to apply interception to.</param>
|
||||
<param name="options">Proxy generation options to apply.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptedBy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},Autofac.Core.Service[])">
|
||||
<summary>
|
||||
Allows a list of interceptor services to be assigned to the registration.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TStyle">Registration style.</typeparam>
|
||||
<param name="builder">Registration to apply interception to.</param>
|
||||
<param name="interceptorServices">The interceptor services.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="builder"/> or <paramref name="interceptorServices"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptedBy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},System.String[])">
|
||||
<summary>
|
||||
Allows a list of interceptor services to be assigned to the registration.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TStyle">Registration style.</typeparam>
|
||||
<param name="builder">Registration to apply interception to.</param>
|
||||
<param name="interceptorServiceNames">The names of the interceptor services.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="builder"/> or <paramref name="interceptorServiceNames"/>.</exception>
|
||||
</member>
|
||||
<member name="M:Autofac.Extras.DynamicProxy.RegistrationExtensions.InterceptedBy``3(Autofac.Builder.IRegistrationBuilder{``0,``1,``2},System.Type[])">
|
||||
<summary>
|
||||
Allows a list of interceptor services to be assigned to the registration.
|
||||
</summary>
|
||||
<typeparam name="TLimit">Registration limit type.</typeparam>
|
||||
<typeparam name="TActivatorData">Activator data type.</typeparam>
|
||||
<typeparam name="TStyle">Registration style.</typeparam>
|
||||
<param name="builder">Registration to apply interception to.</param>
|
||||
<param name="interceptorServiceTypes">The types of the interceptor services.</param>
|
||||
<returns>Registration builder allowing the registration to be configured.</returns>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="builder"/> or <paramref name="interceptorServiceTypes"/>.</exception>
|
||||
</member>
|
||||
<member name="T:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.InterfaceNotSupportedByTransparentProxy">
|
||||
<summary>
|
||||
Looks up a localized string similar to The transparent proxy does not support the additional interface(s): {0}..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.InterfaceProxyingOnlySupportsInterfaceServices">
|
||||
<summary>
|
||||
Looks up a localized string similar to The component {0} cannot use interface interception as it provides services that are not publicly visible interfaces. Check your registration of the component to ensure you're not enabling interception and registering it as an internal/private interface type..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.TransparentProxyIsNotInterface">
|
||||
<summary>
|
||||
Looks up a localized string similar to The transparent proxy of type '{0}' must be an interface..
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Autofac.Extras.DynamicProxy.RegistrationExtensionsResources.TypeIsNotTransparentProxy">
|
||||
<summary>
|
||||
Looks up a localized string similar to The instance of type '{0}' is not a transparent proxy..
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
@@ -1,57 +0,0 @@
|
||||
Apache License, Version 2.0
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
|
||||
2. You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
|
||||
3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
|
||||
4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,360 +0,0 @@
|
||||
# Castle Core Changelog
|
||||
|
||||
## 4.3.1 (2018-06-21)
|
||||
|
||||
Enhancements:
|
||||
- Use shared read locking to reduce lock contention in InvocationHelper and ProxyUtil (@TimLovellSmith, #377)
|
||||
|
||||
Bugfixes:
|
||||
- Prevent interceptors from being able to modify `in` parameters (@stakx, #370)
|
||||
- Make default value replication of optional parameters more tolerant of default values that are represented in metadata with a mismatched type (@stakx, #371)
|
||||
- Fix a concurrency issue (writing without taking a write lock first) in `BaseProxyGenerator.ObtainProxyType` (@stakx, #383)
|
||||
|
||||
Deprecations:
|
||||
- `Castle.DynamicProxy.Generators.Emitters.ArgumentsUtil.IsAnyByRef` (@stakx, #370)
|
||||
|
||||
## 4.3.0 (2018-06-07)
|
||||
|
||||
Enhancements:
|
||||
- Added .NET Standard/.NET Core support for NLog (@snakefoot, #200)
|
||||
- Added .NET Standard/.NET Core support for log4net (@snakefoot, #201)
|
||||
- DynamicProxy supported C# `in` parameter modifiers only on the .NET Framework up until now. Adding .NET Standard 1.5 as an additional target to the NuGet package makes them work on .NET Core, too (@stakx, #339)
|
||||
- Replicate custom attributes on constructor parameters in the generated proxy type constructors to fulfill introspection of constructors. This does not change the proxying behavior. (@stakx, #341)
|
||||
- Improve performance of InvocationHelper cache lookups (@tangdf, #358)
|
||||
- Improve fidelity of default value replication of optional parameters to fulfill inspection of the generated proxies. This does not change the proxying behavior. (@stakx, #356)
|
||||
- Improve cache performance of MethodFinder.GetAllInstanceMethods (@tangdf, #357)
|
||||
|
||||
Bugfixes:
|
||||
- Fix Castle.Services.Logging.Log4netIntegration assembly file name casing which breaks on Linux (@beginor, #324)
|
||||
- Fix Castle.DynamicProxy.Generators.AttributesToAvoidReplicating not being thread safe (InvalidOperationException "Collection was modified; enumeration operation may not execute.") (@BrunoJuchli, #334)
|
||||
- Fix TraceLoggerFactory to allow specifying the default logger level (@acjh, #342)
|
||||
- Ensure that DynamicProxy doesn't create invalid dynamic assemblies when proxying types from non-strong-named assemblies (@stakx, #327)
|
||||
- Fix interceptor selectors being passed `System.RuntimeType` for class proxies instead of the target type (@stakx, #359)
|
||||
- Replace NullReferenceException with descriptive one thrown when interceptors swallow exceptions and cause a null value type to be returned (@jonorossi, #85)
|
||||
|
||||
## 4.2.1 (2017-10-11)
|
||||
|
||||
Bugfixes:
|
||||
- Add missing equality checks in `MethodSignatureComparer.EqualSignatureTypes` to fix `TypeLoadException`s ("Method does not have an implementation") (@stakx, #310)
|
||||
- Add missing XML documentation files to NuGet packages (@fir3pho3nixx, #312)
|
||||
|
||||
## 4.2.0 (2017-09-28)
|
||||
|
||||
Enhancements:
|
||||
- Add IProxyTargetAccessor.DynProxySetTarget to set the target of a proxy (@yallie, #293)
|
||||
- Internal dynamic proxy fields are now private instead of public (@spencercw, #260)
|
||||
|
||||
Bugfixes:
|
||||
- Make ProxyUtil.IsAccessible(MethodBase) take into account declaring type's accessibility so it doesn't report false negatives for e.g. public methods in inaccessible classes. (@stakx, #289)
|
||||
- Fix InvalidCastException calling IChangeProxyTarget.ChangeProxyTarget proxying generic interfaces (@yallie, #293)
|
||||
- Ignore minor/patch level version for AssemblyVersionAttribute as this creates binding errors for downstream libraries (@fir3pho3nixx, #288)
|
||||
- Fix DictionaryAdapter firing NotifyPropertyChang(ed/ing) events after CancelEdit (@Lakritzator, #299)
|
||||
- Fix ArgumentException when overriding method with nested generics (@BitWizJason, #297)
|
||||
- Explicit package versioning applied within solution to avoid maligned NuGet upgrades for lock step versioned packages. (@fir3pho3nixx, #292)
|
||||
|
||||
Deprecations:
|
||||
- IChangeProxyTarget.ChangeProxyTarget is deprecated in favor of IProxyTargetAccessor.DynProxySetTarget (@yallie, #293)
|
||||
|
||||
## 4.1.1 (2017-07-12)
|
||||
|
||||
Bugfixes:
|
||||
- Prevent member name collision when proxy implements same generic interface more than twice (@stakx, #88)
|
||||
- Fix incorrect replication (reversed order) of custom modifiers (modopts and modreqs) on the CLR, does not work yet on Mono (@stakx, #277)
|
||||
- Fix COM interface proxy error case throwing exceptions trying to release null pointer from QueryInterface (@stakx, #281)
|
||||
|
||||
## 4.1.0 (2017-06-11)
|
||||
|
||||
Breaking Changes:
|
||||
- Remove AllowPartiallyTrustedCallersAttribute, which wasn't defined by default (@fir3pho3nixx, #241)
|
||||
- Upgrade log4net to v2.0.8 (@fir3pho3nixx, #241)
|
||||
|
||||
Enhancements:
|
||||
- Add ProxyUtil.IsAccessible to check if a method is accessible to DynamicProxyGenAssembly2 (Blair Conrad, #235)
|
||||
- Refactor build engineering to support AppVeyor and TravisCI (@fir3pho3nixx, #241)
|
||||
|
||||
Bugfixes:
|
||||
- Fix order of class proxy constructor arguments when using multiple mixins (@sebastienros, #230)
|
||||
- Fix dependency on "System.ComponentModel.TypeConverter" NuGet package version that does not exist (#239)
|
||||
- Fix ParamArrayAttribute not being replicated in proxy (@stakx, #121)
|
||||
- Fix System.Net.Mail.SmtpClient is obsolete on Mono warning (#254)
|
||||
|
||||
## 4.0.0 (2017-01-25)
|
||||
|
||||
Breaking Changes:
|
||||
- Update to NLog 4.4.1 and remove beta .NET Core support for NLog (#228)
|
||||
- Update to log4net 2.0.7 (#229)
|
||||
|
||||
Bugfixes:
|
||||
- Fix CustomAttributeInfo.FromExpression for VB.NET (@thomaslevesque, #223)
|
||||
|
||||
## 4.0.0-beta002 (2016-10-28)
|
||||
|
||||
Breaking Changes:
|
||||
- Rework Serilog integration to accept an ILogger rather than a LoggerConfiguration to work correctly with Serilog (#142, #211)
|
||||
- Remove obsolete property `AttributesToAddToGeneratedTypes` from `ProxyGenerationOptions` (#219)
|
||||
- Change type of `ProxyGenerationOptions.AdditionalAttributes` to `IList<CustomAttributeInfo>` (#219)
|
||||
- Remove `IAttributeDisassembler` which is no longer necessary (#219)
|
||||
|
||||
Enhancements:
|
||||
- Add IProxyGenerator interface for the ProxyGenerator class (#215)
|
||||
- Improve default list of attributes to avoid replicating. Code Access Security attributes and MarshalAsAttribute will no longer be replicated (#221)
|
||||
|
||||
Bugfixes:
|
||||
- Fix building on Mono 4.6.1
|
||||
- Different attributes in `ProxyGenerationOptions.AdditionalAttributes` now generates different proxy types (#219)
|
||||
|
||||
## 4.0.0-beta001 (2016-07-17)
|
||||
|
||||
Breaking Changes:
|
||||
- Update to log4net 1.2.15/2.0.5 (#199)
|
||||
- Update to NLog 4.4.0-beta13 (#199)
|
||||
- Update to Serilog 2.0.0 (#199)
|
||||
|
||||
Enhancements:
|
||||
- .NET Core 1.0 and .NET Standard 1.3 support (Jonathon Rossi, Jeremy Meng)
|
||||
- Restore DynamicDictionary class
|
||||
|
||||
Bugfixes:
|
||||
- Fix target framework moniker in NuGet package for .NET Core (#174)
|
||||
|
||||
## 4.0.0-alpha001 (2016-04-07)
|
||||
|
||||
Breaking Changes:
|
||||
- Remove all Silverlight support (#100, #150)
|
||||
- Remove DynamicProxy's RemotableInvocation and remoting support for invocations (#110, #65)
|
||||
|
||||
Enhancements:
|
||||
- .NET Core DNX and dotnet5.4 support via feature conditional compilation (Jonathon Rossi, Jeremy Meng)
|
||||
- Build script improvements and consolidate version numbers (Blair Conrad, #75, #152, #153)
|
||||
|
||||
Bugfixes:
|
||||
- Fix 'System.ArgumentException: Constant does not match the defined type' with optional, nullable enum method parameters (Daniel Yankowsky, #141, #149)
|
||||
- Fix proxy generation hook notification for virtual but final methods (Axel Heer, #148)
|
||||
- Fix InvalidCastException with custom attribute having an enum array parameter with non-int enum (@csharper2010, #104, #105)
|
||||
- Update to Mono 4.0.2 and improve Mono support (#79, #95, #102)
|
||||
- Fix 'System.ArrayTypeMismatchException: Source array type cannot be assigned to destination array type' on Mono (#81)
|
||||
- Fix 'System.ArgumentException: System.Decimal is not a supported constant type' with optional method parameters (@fknx, #87, #91)
|
||||
- Fix ProxyGenerator cache does not take into account AdditionalAttributes (@cmerat, #77, #78)
|
||||
- Fix Castle.Services.Logging.SerilogIntegration.dll missing some assembly info attributes (@imzshh, #20, #82)
|
||||
|
||||
## 3.3.3 (2014-11-06)
|
||||
- Fix Serilog integration modifies LoggerConfiguration.MinimumLevel (#70)
|
||||
- Add SourceContext to the Serilog logger (@KevivL, #69)
|
||||
|
||||
## 3.3.2 (2014-11-03)
|
||||
- fixed #66 - SerilogLogger implementation bug where exceptions were passed through incorrectly
|
||||
|
||||
## 3.3.1 (2014-09-10)
|
||||
- implemented #61 - Added support for Serilog - contributed by Russell J Baker (@ruba1987)
|
||||
|
||||
## 3.3.0 (2014-04-27)
|
||||
- implemented #51 - removed abandoned projects: Binder, Pagination, Validator
|
||||
- implemented #49 - build NuGet and Zip packages from TeamCity - contributed by Blair Conrad (@blairconrad)
|
||||
- implemented #42 - move complicated BuildInternalsVisibleMessageForType method out of DynamicProxyBuilder - contributed by Blair Conrad (@blairconrad)
|
||||
- fixed #47 - Calling DynamicProxy proxy methods with multidimensional array parameters - contributed by Ed Parcell (@edparcell)
|
||||
- fixed #44 - DictionaryAdapter FetchAttribute on type has no effect
|
||||
- fixed #34 and #39 - inaccessible type parameters should give better error messages - contributed by Blair Conrad (@blairconrad)
|
||||
|
||||
## 3.2.2 (2013-11-30)
|
||||
- fixed #35 - ParameterBuilder.SetConstant fails when using a default value of null - contributed by (@jonasro)
|
||||
|
||||
## 3.2.1 (2013-10-05)
|
||||
- fixed #32 - Improve configuration of SmtpClient in sync sending - contributed by Artur Dorochowicz (@ArturDorochowicz)
|
||||
- fixed #31 - [DynamicProxy] Preserve DefaultValues of proxied method's parameters (in .NET 4.5)
|
||||
- fixed #30 - tailoring InternalsVisibleTo message based on assembly of inaccessible type - contributed by Blair Conrad (@blairconrad)
|
||||
- fixed #27 - Allow dynamic proxy of generic interfaces which have generic methods, under Mono 2.10.8 and Mono 3.0.6 - contributed by Iain Ballard (@i-e-b)
|
||||
- fixed #26 - Proxy of COM class issue, reference count incremented - contributed by Jean-Claude Viau (@jcviau)
|
||||
- fixed DYNPROXY-188 - CreateInterfaceProxyWithoutTarget fails with interface containing member with 'ref UIntPtr' - contributed by Pier Janssen (@Pjanssen)
|
||||
- fixed DYNPROXY-186 - .Net remoting (transparent proxy) cannot be proxied - contributed by Jean-Claude Viau (@jcviau)
|
||||
- fixed DYNPROXY-185 - ProxyUtil.GetUnproxiedInstance returns proxy object for ClassProxyWithTarget instead of its target - contributed by Dmitry Xlestkov (@d-s-x)
|
||||
|
||||
## 3.2.0 (2013-02-16)
|
||||
- fixed DYNPROXY-179 - Exception when creating a generic proxy (from cache)
|
||||
- fixed DYNPROXY-175 - invalid CompositionInvocation type used when code uses interface proxies with and without InterceptorSelector
|
||||
|
||||
## 3.1.0 (2012-08-05)
|
||||
- fixed DYNPROXY-174 - Unable to cast object of type 'System.Collections.ObjectModel.ReadOnlyCollection\`1[System.Reflection.CustomAttributeTypedArgument]' to type 'System.Array'
|
||||
|
||||
## 3.1.0 RC (2012-07-08)
|
||||
- support multiple inheritance of DA attributes on interfaces.
|
||||
- BREAKING CHANGE: removed propagated child notifications as it violated INotifyPropertyChanged contract
|
||||
- improved DictionaryAdapter performance
|
||||
- generalized IBindingList support for DictionaryAdapters
|
||||
- added reference support to XmlAdapter
|
||||
- BREAKING CHANGE: refactored XPathAdapter into XmlAdapter with much more flexibility to support other input like XLinq
|
||||
- implemented CORE-43 - Add option to skip configuring log4net/nlog
|
||||
- fixed CORE-44 - NLog logger does not preserver call site info
|
||||
- fixed DYNPROXY-171 - PEVerify error on generic method definition
|
||||
- fixed DYNPROXY-170 - Calls to properties inside non-intercepted methods are not forwarded to target object (regression from v2.5)
|
||||
- fixed DYNPROXY-169 - Support IChangeProxyTarget on additional interfaces and mixins when using CreateInterfaceProxyWithTargetInterface
|
||||
|
||||
## 3.0.0 (2011-12-13)
|
||||
- no major changes since RC
|
||||
|
||||
## 3.0.0 RC 1 (2011-11-20)
|
||||
- Applied Jeff Sharps patch that refactored Xml DictionaryAdapter to improve maintainability and enable more complete functionality
|
||||
- fixed DYNPROXY-165 - Object.GetType() and Object.MemberwiseClone() should be ignored and not reported as non-interceptable to IProxyGenerationHook
|
||||
- fixed DYNPROXY-164 - Invalid Proxy type generated when there are more than one base class generic constraints
|
||||
- fixed DYNPROXY-162 - ref or out parameters can not be passed back if proxied method throw an exception
|
||||
|
||||
## 3.0.0 beta 1 (2011-08-14)
|
||||
|
||||
Breaking Changes:
|
||||
* Removed overloads of logging methods that were taking format string from ILogger and ILogger and IExtendedLogger and didn't have word Format in their name.
|
||||
* For example:
|
||||
* void Error(string format, params object[] args); // was removed
|
||||
* void ErrorFormat(string format, params object[] args); //use this one instead
|
||||
* impact - low
|
||||
* fixability - medium
|
||||
* description - To minimize confusion and duplication those methods were removed.
|
||||
* fix - Use methods that have explicit "Format" word in their name and same signature.
|
||||
* Removed WebLogger and WebLoggerFactory
|
||||
* impact - low
|
||||
* fixability - medium
|
||||
* description - To minimize management overhead the classes were removed so that only single Client Profile version of Castle.Core can be distributed.
|
||||
* fix - You can use NLog or Log4Net web logger integration, or reuse implementation of existing web logger and use it as a custom logger.
|
||||
* Removed obsolete overload of ProxyGenerator.CreateClassProxy
|
||||
* impact - low
|
||||
* fixability - trivial
|
||||
* description - Deprecated overload of ProxyGenerator.CreateClassProxy was removed to keep the method consistent with other methods and to remove confusion
|
||||
* fix - whenever removed overload was used, use one of the other overloads.
|
||||
* IProxyGenerationHook.NonVirtualMemberNotification method was renamed
|
||||
* impact - high
|
||||
* fixability - easy
|
||||
* description - to accommodate class proxies with target method NonVirtualMemberNotification on IProxyGenerationHook type was renamed to more accurate
|
||||
NonProxyableMemberNotification since for class proxies with target not just methods but also fields and other member that break the abstraction will
|
||||
be passed to this method.
|
||||
* fix - whenever NonVirtualMemberNotification is used/implemented change the method name to
|
||||
NonProxyableMemberNotification. Implementors should also accommodate possibility that not
|
||||
only MethodInfos will be passed as method's second parameter.
|
||||
* DynamicProxy will now allow to intercept members of System.Object
|
||||
* impact - very low
|
||||
* fixability - easy
|
||||
* description - to allow scenarios like mocking of System.Object members, DynamicProxy will not
|
||||
disallow proxying of these methods anymore. AllMethodsHook (default IProxyGenerationHook)
|
||||
will still filter them out though.
|
||||
* fix - whenever custom IProxyGenerationHook is used, user should account for System.Object's
|
||||
members being now passed to ShouldInterceptMethod and NonVirtualMemberNotification methods
|
||||
and if necessary update the code to handle them appropriately.
|
||||
|
||||
Bugfixes:
|
||||
- fixed CORE-37 - TAB characters in the XML Configuration of a component parameter is read as String.Empty
|
||||
- fixed DYNPROXY-161 - Strong Named DynamicProxy Assembly Not Available in Silverlight
|
||||
- fixed DYNPROXY-159 - Sorting MemberInfo array for serialization has side effects
|
||||
- fixed DYNPROXY-158 - Can't create class proxy with target and without target in same ProxyGenerator
|
||||
- fixed DYNPROXY-153 - When proxying a generic interface which has an interface as GenericType . No proxy can be created
|
||||
- fixed DYNPROXY-151 - Cast error when using attributes
|
||||
- implemented CORE-33 - Add lazy logging
|
||||
- implemented DYNPROXY-156 - Provide mechanism for interceptors to implement retry logic
|
||||
- removed obsolete members from ILogger and its implementations
|
||||
|
||||
## 2.5.2 (2010-11-15)
|
||||
- fixed DYNPROXY-150 - Finalizer should not be proxied
|
||||
- implemented DYNPROXY-149 - Make AllMethodsHook members virtual so it can be used as a base class
|
||||
- fixed DYNPROXY-147 - Can't create class proxies with two non-public methods having same argument types but different return type
|
||||
- fixed DYNPROXY-145 Unable to proxy System.Threading.SynchronizationContext (.NET 4.0)
|
||||
- fixed DYNPROXY-144 - params argument not supported in constructor
|
||||
- fixed DYNPROXY-143 - Permit call to reach "non-proxied" methods of inherited interfaces
|
||||
- implemented DYNPROXY-139 - Better error message
|
||||
- fixed DYNPROXY-133 - Debug assertion in ClassProxyInstanceContributor fails when proxying ISerializable with an explicit implementation of GetObjectData
|
||||
- fixed CORE-32 - Determining if permission is granted via PermissionUtil does not work in .NET 4
|
||||
- applied patch by Alwin Meijs - ExtendedLog4netFactory can be configured with a stream from for example an embedded log4net xml config
|
||||
- Upgraded NLog to 2.0 Beta 1
|
||||
- Added DefaultXmlSerializer to bridge XPathAdapter with standard Xml Serialization.
|
||||
- XPathAdapter for DictionaryAdapter added IXPathSerializer to provide hooks for custom serialization.
|
||||
|
||||
## 2.5.1 (2010-09-21)
|
||||
- Interface proxy with target Interface now accepts null as a valid target value (which can be replaced at a later stage).
|
||||
- DictionaryAdapter behavior overrides are now ordered with all other behaviors
|
||||
- BREAKING CHANGE: removed web logger so that by default Castle.Core works in .NET 4 client profile
|
||||
- added parameter to ModuleScope disabling usage of signed modules. This is to workaround issue DYNPROXY-134. Also a descriptive exception message is being thrown now when the issue is detected.
|
||||
- Added IDictionaryBehaviorBuilder to allow grouping behaviors
|
||||
- Added GenericDictionaryAdapter to simplify generic value sources
|
||||
- fixed issue DYNPROXY-138 - Error message missing space
|
||||
- fixed false positive where DynamicProxy would not let you proxy interface with target interface when target object was a COM object.
|
||||
- fixed ReflectionBasedDictionaryAdapter when using indexed properties
|
||||
|
||||
## 2.5.0 (2010-08-21)
|
||||
- DynamicProxy will now not replicate non-public attribute types
|
||||
- Applied patch from Kenneth Siewers Møller which adds parameterless constructor to DefaultSmtpSender implementation, to be able to configure the inner SmtpClient from the application configuration file (system.net.smtp).
|
||||
- added support for .NET 4 and Silverlight 4, updated solution to VisualStudio 2010
|
||||
- Removed obsolete overload of CreateClassProxy
|
||||
- Added class proxy with target
|
||||
- Added ability to intercept explicitly implemented generic interface methods on class proxy.
|
||||
- DynamicProxy does not disallow intercepting members of System.Object anymore. AllMethodsHook will still filter them out though.
|
||||
- Added ability to intercept explicitly implemented interface members on class proxy. Does not support generic members.
|
||||
- Merged DynamicProxy into Core binary
|
||||
- fixed DYNPROXY-ISSUE-132 - "MetaProperty equals implementation incorrect"
|
||||
- Fixed bug in DiagnosticsLoggerTestCase, where when running as non-admin, the teardown will throw SecurityException (contributed by maxild)
|
||||
- Split IoC specific classes into Castle.Windsor project
|
||||
- Merged logging services solution
|
||||
- Merged DynamicProxy project
|
||||
|
||||
## 1.2.0 (2010-01-11)
|
||||
- Added IEmailSender interface and its default implementation
|
||||
|
||||
## 1.2.0 beta (2009-12-04)
|
||||
- BREAKING CHANGE - added ChangeProxyTarget method to IChangeProxyTarget interface
|
||||
- added docs to IChangeProxyTarget methods
|
||||
- Fixed DYNPROXY-ISSUE-108 - Obtaining replicated custom attributes on proxy may fail when property setter throws exception on default value
|
||||
- Moved custom attribute replication from CustomAttributeUtil to new interface - IAttributeDisassembler
|
||||
- Exposed IAttributeDisassembler via ProxyGenerationOptions, so that users can plug their implementation for some convoluted scenarios. (for Silverlight)
|
||||
- Moved IInterceptorSelector from Dynamic Proxy to Core (IOC-ISSUE-156)
|
||||
|
||||
## 1.1.0 (2009-05-04)
|
||||
- Applied Eric Hauser's patch fixing CORE-ISSUE-22
|
||||
"Support for environment variables in resource URI"
|
||||
- Applied Gauthier Segay's patch fixing CORE-ISSUE-20
|
||||
"Castle.Core.Tests won't build via nant because it use TraceContext without referencing System.Web.dll"
|
||||
- Added simple interface to ComponentModel to make optional properties required.
|
||||
- Applied Mark's -- <mwatts42@gmail.com> -- patch that changes
|
||||
the Core to support being compiled for Silverlight 2
|
||||
- Applied Louis DeJardin's patch adding TraceLogger as a new logger implementation
|
||||
- Applied Chris Bilson's patch fixing CORE-15
|
||||
"WebLogger Throws When Logging Outside of an HttpContext"
|
||||
|
||||
## Release Candidate 3
|
||||
- Added IServiceProviderEx which extends IServiceProvider
|
||||
- Added Pair<T,S> class.
|
||||
- Applied Bill Pierce's patch fixing CORE-9
|
||||
"Allow CastleComponent Attribute to Specify Lifestyle in Constructor"
|
||||
- Added UseSingleInterfaceProxy to CompomentModel to control the proxying
|
||||
behavior while maintaining backward compatibility.
|
||||
Added the corresponding ComponentProxyBehaviorAttribute.
|
||||
- Made NullLogger and IExtnededLogger
|
||||
- Enabled a new format on ILogger interface, with 6 overloads for each method:
|
||||
- Debug(string)
|
||||
- Debug(string, Exception)
|
||||
- Debug(string, params object[])
|
||||
- DebugFormat(string, params object[])
|
||||
- DebugFormat(Exception, string, params object[])
|
||||
- DebugFormat(IFormatProvider, string, params object[])
|
||||
- DebugFormat(IFormatProvider, Exception, string, params object[])
|
||||
- The "FatalError" overloads where marked as [Obsolete], replaced by "Fatal" and "FatalFormat".
|
||||
|
||||
## 0.0.1.0
|
||||
- Included IProxyTargetAccessor
|
||||
- Removed IMethodInterceptor and IMethodInvocation, that have been replaced by IInterceptor and IInvocation
|
||||
- Added FindByPropertyInfo to PropertySetCollection
|
||||
- Made the DependencyModel.IsOptional property writable
|
||||
- Applied Curtis Schlak's patch fixing IOC-27
|
||||
"assembly resource format only works for resources where the assemblies name and default namespace are the same."
|
||||
|
||||
Quoting:
|
||||
|
||||
"I chose to preserve backwards compatibility by implementing the code in the
|
||||
reverse order as suggested by the reporter. Given the following URI for a resource:
|
||||
|
||||
assembly://my.cool.assembly/context/moo/file.xml
|
||||
|
||||
It will initially look for an embedded resource with the manifest name of
|
||||
"my.cool.assembly.context.moo.file.xml" in the loaded assembly my.cool.assembly.dll.
|
||||
If it does not find it, then it looks for the embedded resource with the manifest name
|
||||
of "context.moo.file.xml".
|
||||
- IServiceEnabledComponent Introduced to be used across the project as
|
||||
a standard way to have access to common services, for example, logger factories
|
||||
- Added missing log factories
|
||||
- Refactor StreamLogger and DiagnosticLogger to be more consistent behavior-wise
|
||||
- Refactored WebLogger to extend LevelFilteredLogger (removed duplication)
|
||||
- Refactored LoggerLevel order
|
||||
- Project started
|
||||
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
Copyright 2004-2016 Castle Project - http://www.castleproject.org/
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
Thanks for downloading this Castle package.
|
||||
You can find full list of changes in CHANGELOG.md
|
||||
|
||||
Documentation (work in progress, contributions appreciated):
|
||||
DictionaryAdapter: https://github.com/castleproject/Core/blob/master/docs/dictionaryadapter.md
|
||||
DynamicProxy: https://github.com/castleproject/Core/blob/master/docs/dynamicproxy.md
|
||||
Discussion group: http://groups.google.com/group/castle-project-users
|
||||
StackOverflow tags: castle-dynamicproxy, castle-dictionaryadapter, castle
|
||||
|
||||
Issue tracker: https://github.com/castleproject/Core/issues
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) .NET Foundation and Contributors
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Binary file not shown.
@@ -1,226 +0,0 @@
|
||||
.NET Core uses third-party libraries or other resources that may be
|
||||
distributed under licenses different than the .NET Core software.
|
||||
|
||||
In the event that we accidentally failed to list a required notice, please
|
||||
bring it to our attention. Post an issue or email us:
|
||||
|
||||
dotnet@microsoft.com
|
||||
|
||||
The attached notices are provided for information only.
|
||||
|
||||
License notice for Slicing-by-8
|
||||
-------------------------------
|
||||
|
||||
http://sourceforge.net/projects/slicing-by-8/
|
||||
|
||||
Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
|
||||
|
||||
|
||||
This software program is licensed subject to the BSD License, available at
|
||||
http://www.opensource.org/licenses/bsd-license.html.
|
||||
|
||||
|
||||
License notice for Unicode data
|
||||
-------------------------------
|
||||
|
||||
http://www.unicode.org/copyright.html#License
|
||||
|
||||
Copyright © 1991-2017 Unicode, Inc. All rights reserved.
|
||||
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Unicode data files and any associated documentation
|
||||
(the "Data Files") or Unicode software and any associated documentation
|
||||
(the "Software") to deal in the Data Files or Software
|
||||
without restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, and/or sell copies of
|
||||
the Data Files or Software, and to permit persons to whom the Data Files
|
||||
or Software are furnished to do so, provided that either
|
||||
(a) this copyright and permission notice appear with all copies
|
||||
of the Data Files or Software, or
|
||||
(b) this copyright and permission notice appear in associated
|
||||
Documentation.
|
||||
|
||||
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
|
||||
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
|
||||
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder
|
||||
shall not be used in advertising or otherwise to promote the sale,
|
||||
use or other dealings in these Data Files or Software without prior
|
||||
written authorization of the copyright holder.
|
||||
|
||||
License notice for Zlib
|
||||
-----------------------
|
||||
|
||||
https://github.com/madler/zlib
|
||||
http://zlib.net/zlib_license.html
|
||||
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.2.11, January 15th, 2017
|
||||
|
||||
Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
*/
|
||||
|
||||
License notice for Mono
|
||||
-------------------------------
|
||||
|
||||
http://www.mono-project.com/docs/about-mono/
|
||||
|
||||
Copyright (c) .NET Foundation Contributors
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the Software), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License notice for International Organization for Standardization
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Portions (C) International Organization for Standardization 1986:
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
|
||||
License notice for Intel
|
||||
------------------------
|
||||
|
||||
"Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
License notice for Xamarin and Novell
|
||||
-------------------------------------
|
||||
|
||||
Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Copyright (c) 2011 Novell, Inc (http://www.novell.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Third party notice for W3C
|
||||
--------------------------
|
||||
|
||||
"W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE
|
||||
Status: This license takes effect 13 May, 2015.
|
||||
This work is being provided by the copyright holders under the following license.
|
||||
License
|
||||
By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
|
||||
Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications:
|
||||
The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
|
||||
Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.
|
||||
Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)."
|
||||
Disclaimers
|
||||
THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
||||
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
|
||||
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders."
|
||||
|
||||
License notice for Bit Twiddling Hacks
|
||||
--------------------------------------
|
||||
|
||||
Bit Twiddling Hacks
|
||||
|
||||
By Sean Eron Anderson
|
||||
seander@cs.stanford.edu
|
||||
|
||||
Individually, the code snippets here are in the public domain (unless otherwise
|
||||
noted) — feel free to use them however you please. The aggregate collection and
|
||||
descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are
|
||||
distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and
|
||||
without even the implied warranty of merchantability or fitness for a particular
|
||||
purpose.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user