AspectSharp.AssertUtil.ArgumentIsInterface C# (CSharp) Метод

ArgumentIsInterface() публичный статический Метод

public static ArgumentIsInterface ( Type args, String argName ) : void
args System.Type
argName String
Результат void
		public static void ArgumentIsInterface(Type[] args, String argName)
		{
			foreach (Type type in args)
			{
				ArgumentIsInterface(type, argName);
			}
		}

Usage Example

Пример #1
0
        /// <summary>
        /// Wraps an interface. The target argument must be an
        /// object capable of responding to the interface messages, or
        /// your interceptors must be capable of respoding to them.
        /// </summary>
        /// <param name="inter">Interface to be wrapped</param>
        /// <param name="target">The object that responds to the interface messages</param>
        /// <returns>A proxy</returns>
        public virtual object WrapInterface(Type inter, object target)
        {
            AssertUtil.ArgumentNotNull(target, "target");
            AssertUtil.ArgumentIsInterface(inter, "interface");

            AspectDefinition[] aspects = AspectMatcher.Match(inter, Configuration.Aspects);

            AspectDefinition aspectdef = Union(aspects);

            return(ProxyFactory.CreateInterfaceProxy(inter, target, aspectdef));
        }