コード例 #1
0
        static string ToString(Dnr2035Version v)
        {
            switch (v)
            {
            case Dnr2035Version.V20: return("2.0");

            case Dnr2035Version.V30: return("3.0");

            case Dnr2035Version.V35: return("3.5");

            default: throw new InvalidOperationException();
            }
        }
コード例 #2
0
        // If input module is V35, use it, else check all its assembly references for version and
        // use highest version found. It doesn't try to check the asm refs of the asm refs, this
        // should be enough.
        static string GetDotNetVersion2035(ModuleDef module)
        {
            Dnr2035Version ver = Dnr2035Version.V20;

            foreach (var m in GetModules(module))
            {
                ver = Max(ver, GetDotNetVersion2035Internal(m));
                if (ver == Dnr2035Version.V35)
                {
                    return(ToString(ver));
                }
            }

            return(ToString(ver));
        }
コード例 #3
0
 static Dnr2035Version Max(Dnr2035Version a, Dnr2035Version b) => a > b ? a : b;
コード例 #4
0
ファイル: DotNetUtils.cs プロジェクト: lovebanyi/dnSpy
		static string ToString(Dnr2035Version v) {
			switch (v) {
			case Dnr2035Version.V20: return "v2.0";
			case Dnr2035Version.V30: return "v3.0";
			case Dnr2035Version.V35: return "v3.5";
			default: throw new InvalidOperationException();
			}
		}
コード例 #5
0
ファイル: DotNetUtils.cs プロジェクト: lovebanyi/dnSpy
		static Dnr2035Version Max(Dnr2035Version a, Dnr2035Version b) {
			return a > b ? a : b;
		}
コード例 #6
0
		static Dnr2035Version Max(Dnr2035Version a, Dnr2035Version b) => a > b ? a : b;
コード例 #7
0
 static Dnr2035Version Max(Dnr2035Version a, Dnr2035Version b)
 {
     return(a > b ? a : b);
 }