Exemplo n.º 1
0
        public MethodWrapper(MethodDefinition targetMethod, MethodReference invokeTargetMethod, TypeWrapper declaringType, TypeWrapper returnType, TypeWrapper[] parameters)
        {
            this.TargetMethod       = targetMethod;
            this.InvokeTargetMethod = invokeTargetMethod;
            this.DeclaringType      = declaringType;
            this.ReturnType         = returnType;
            this.Parameters         = parameters;
            MethodFlag none = MethodFlag.None;

            if (targetMethod.IsStatic)
            {
                none |= MethodFlag.Static;
            }
            using (Collection <CustomAttribute> .Enumerator enumerator = targetMethod.CustomAttributes.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    TypeReference attributeType = enumerator.Current.AttributeType;
                    if (attributeType.GetAssemblyName() == "UnityEngine")
                    {
                        if (attributeType.FullName == "UnityEngine.ImageEffectOpaque")
                        {
                            none |= MethodFlag.HasImageEffectOpaqueAttribute;
                        }
                        if (attributeType.FullName == "UnityEngine.ImageEffectTransformsToLDR")
                        {
                            none |= MethodFlag.HasImageEffectTransformsToLDRAttribute;
                        }
                    }
                }
            }
            this.Flags = none;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 显示模式窗口
 /// </summary>
 /// <returns>操作是否成功</returns>
 public void ShowDialog(MethodFlag f)
 {
     ShowDialog();
 }