目录
1.1 An provider to get all attributes decorated on method or declarative type
1.2 Get all attributes decorated on method or declarative type
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Flatwhite.Core.Provider
{
/// <summary>
/// </summary>
public interface IAttributeProvider
{
/// <summary>
/// </summary>
/// <param name="methodInfo"></param>
/// <param name="invocationContext"></param>
/// <returns></returns>
IEnumerable<Attribute> GetAttributes(MethodInfo methodInfo, IDictionary<string, object> invocationContext);
}
}
using System.Collections.Generic;
namespace Flatwhite.Core.Provider
{
/// <summary>
/// </summary>
public interface IContextProvider
{
/// <summary>
/// Get context
/// </summary>
/// <returns></returns>
IDictionary<string, object> GetContext();
}
internal class EmptyContextProvider : IContextProvider
{
public IDictionary<string, object> GetContext()
{
return new Dictionary<string, object>();
}
}
}