/src/SampleLibrary/Proxy/SerializableInterceptor.cs
http://github.com/philiplaureano/LinFu · C# · 33 lines · 26 code · 7 blank · 0 comment · 0 complexity · 41debd5d667556f12b5fbdafe4bd45ca MD5 · raw file
- using System;
- using System.Runtime.Serialization;
- using LinFu.AOP.Interfaces;
- namespace SampleLibrary.Proxy
- {
- [Serializable]
- public class SerializableInterceptor : MarshalByRefObject, IInterceptor, ISerializable
- {
- public SerializableInterceptor()
- {
- }
- public SerializableInterceptor(SerializationInfo info, StreamingContext context)
- {
- Identifier = (Guid) info.GetValue("identifier", typeof(Guid));
- }
- public Guid Identifier { get; set; }
- public object Intercept(IInvocationInfo info)
- {
- return null;
- }
- public void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- info.AddValue("identifier", Identifier);
- }
- }
- }