MethodInfoCache

目录

1 MethodInfoCache

2 MethodInvocationContext

2.1 /// Contains basic information about a method action

2.1.1 /// The Invocation data

  1. MethodInfoCache

using System;

using System.Collections.Concurrent;

using System.Collections.Generic;

using System.Reflection;

namespace Flatwhite.Core

{

    internal class MethodInfoCache

    {

        /// 

        /// 

        public MethodInfoCache()

        {

            var primitiveTypes = new List

            {

                typeof (short),

                typeof (ushort),

                typeof (int),

                typeof (uint),

                typeof (long),

                typeof (ulong),

                typeof (bool),

                typeof (char),

                typeof (byte),

                typeof (string),

                typeof (decimal),

                typeof (float),

                typeof (double),

                typeof (DateTime),

                typeof (Guid),

            };

            var nullable = typeof(Nullable<>);

        }

        public readonly IDictionary> AttributeCache = new ConcurrentDictionary>();

        public readonly IDictionarybool> InterceptableCache = new ConcurrentDictionarybool>();

    }

}

  1. MethodInvocationContext

using System.Collections.Generic;

using System.ComponentModel;

using System.Reflection;

namespace Flatwhite.Core

{

/// 

    1. /// Contains basic information about a method action

/// 

public abstract class MethodInvocationContext

{

/// 

/// The MethodInfo of the executing method

/// 

public MethodInfo MethodInfo { get; internal set; }

/// 

/// The invocation context of the executing method

/// 

public IDictionary<string, object> InvocationContext { get; internal set; }

/// 

/// The result of the method being filtered. Set value to stop the chain

/// 

public object Result {get;set;}

/// 

      1. /// The Invocation data

/// 

[EditorBrowsable(EditorBrowsableState.Never)]

public IInvocation Invocation { get; internal set; }

}

}

你可能感兴趣的:(Flatwhite,java,windows,开发语言)