コード例 #1
0
        public override void ApplyPatch()
        {
            GenericConstrantsPatch genericConstrantsPatch = new GenericConstrantsPatch();
            genericConstrantsPatch.Apply(this);
            base.ApplyPatch();

            var arrayInitReturnForYieldPatch = new ArrayInitReturnForYieldPatch();
            arrayInitReturnForYieldPatch.Apply(this);
            // what if this methid is static, and this class/struct is generic?
            // we must move this generic to static method

            if (!Modifiers.IsStatic)
            {
                return;
            }

            var clssStr = GetAncestor<ClassStructDeclarationTranslation>();
            if(clssStr == null || clssStr.TypeParameterList == null)
            {
                return;
            }

            if(this.TypeParameterList != null)
            {
                return;
            }

            this.TypeParameterList = new TypeParameterListTranslation() {
                Parent = this,
                SyntaxString = clssStr.TypeParameterList.Translate()
            };
        }
コード例 #2
0
 public override void ApplyPatch()
 {
     GenericConstrantsPatch genericConstrantsPatch = new GenericConstrantsPatch();
     genericConstrantsPatch.Apply(this);
     base.ApplyPatch();
     /// OverloadingPatch patch = new OverloadingPatch();
     // patch.Apply(this);
 }