• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FrameworkVersion类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FrameworkVersion的典型用法代码示例。如果您正苦于以下问题:C# FrameworkVersion类的具体用法?C# FrameworkVersion怎么用?C# FrameworkVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FrameworkVersion类属于命名空间,在下文中一共展示了FrameworkVersion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Framework

 public Framework this[FrameworkVersion version]
 {
     get
     {
         return new Framework(version);
     }
 }
开发者ID:emmekappa,项目名称:horn_src,代码行数:7,代码来源:FrameworkLocator.cs


示例2: Create

        public static UpdateInfo Create(ReleaseEntry currentVersion, IEnumerable<ReleaseEntry> availableReleases, string packageDirectory, FrameworkVersion appFrameworkVersion)
        {
            Contract.Requires(availableReleases != null);
            Contract.Requires(!String.IsNullOrEmpty(packageDirectory));

            var latestFull = availableReleases.MaxBy(x => x.Version).FirstOrDefault(x => !x.IsDelta);
            if (latestFull == null) {
                throw new Exception("There should always be at least one full release");
            }

            if (currentVersion == null) {
                return new UpdateInfo(currentVersion, new[] { latestFull }, packageDirectory, appFrameworkVersion);
            }

            if (currentVersion.Version == latestFull.Version) {
                return new UpdateInfo(currentVersion, Enumerable.Empty<ReleaseEntry>(), packageDirectory, appFrameworkVersion);
            }

            var newerThanUs = availableReleases.Where(x => x.Version > currentVersion.Version)
                                               .OrderBy(v => v.Version);
            var deltasSize = newerThanUs.Where(x => x.IsDelta).Sum(x => x.Filesize);

            return (deltasSize < latestFull.Filesize && deltasSize > 0)
                ? new UpdateInfo(currentVersion, newerThanUs.Where(x => x.IsDelta).ToArray(), packageDirectory, appFrameworkVersion)
                : new UpdateInfo(currentVersion, new[] { latestFull }, packageDirectory, appFrameworkVersion);
        }
开发者ID:ralberts,项目名称:Shimmer,代码行数:26,代码来源:UpdateInfo.cs


示例3: UpdateManager

        public UpdateManager(string urlOrPath, 
            string applicationName,
            FrameworkVersion appFrameworkVersion,
            string rootDirectory = null,
            IFileDownloader urlDownloader = null)
        {
            Contract.Requires(!String.IsNullOrEmpty(urlOrPath));
            Contract.Requires(!String.IsNullOrEmpty(applicationName));

            updateUrlOrPath = urlOrPath;
            this.applicationName = applicationName;
            this.appFrameworkVersion = appFrameworkVersion;
            this.urlDownloader = urlDownloader ?? new FileDownloader();

            if (rootDirectory != null) {
                this.rootAppDirectory = Path.Combine(rootDirectory, applicationName);
                return;
            }

            // Determine the rootAppDirectory in such a way so that Portable 
            // Apps are more likely to work
            var entry = Assembly.GetEntryAssembly();
            if (entry != null) {
                rootDirectory = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(entry.Location), "..", ".."));
            }

            this.rootAppDirectory = Path.Combine(rootDirectory ?? getLocalAppDataDirectory(), applicationName);

        }
开发者ID:morefun0302,项目名称:Squirrel.Windows,代码行数:29,代码来源:UpdateManager.cs


示例4: GetReferencedAssemblies

        public static List<string> GetReferencedAssemblies(FrameworkVersion frameworkVersion)
        {
            switch (frameworkVersion)
            {
                case FrameworkVersion.Version11:
                    break;
                case FrameworkVersion.Version20:
                    break;
                case FrameworkVersion.Version30:
                    break;
                case FrameworkVersion.Version35:
                    break;
                case FrameworkVersion.Version40:
                    break;
            }
            List<string> collection = new List<string>();
            //string[] list = new string[] { "MicroSoft.VisualBasic.dll", "System.dll", "System.Data.dll", "System.xml.dll", "System.Windows.Forms.dll"};
            //collection.AddRange(list);
            //collection.Add(Path.GetFileName(typeof(CodeCompilerFactory).Assembly.Location));
            //collection.Add(Path.GetFileName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName));
            foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
            {
                collection.Add(asm.Location);
            }

            return collection;
        }
开发者ID:piaolingzxh,项目名称:Justin,代码行数:27,代码来源:JCodeCompiler.cs


示例5: DetectFrameworkVersion

        public void DetectFrameworkVersion(string packageName, FrameworkVersion expected)
        {
            var path = IntegrationTestHelper.GetPath("fixtures", packageName);

            var zip = new ZipPackage(path);

            Assert.Equal(expected, zip.DetectFrameworkVersion());
        }
开发者ID:ralberts,项目名称:Shimmer,代码行数:8,代码来源:PackageExtensionsTests.cs


示例6: PathToBuildTool

        public string PathToBuildTool(IPackageTree packageTree, FrameworkVersion version)
        {
            var path = Path.Combine(packageTree.Root.CurrentDirectory.FullName, "buildengines");
            path = Path.Combine(path, "Phantom");
            path = Path.Combine(path, "Phantom.exe");

            return new FileInfo(path).FullName;
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:8,代码来源:PhantomBuildTool.cs


示例7: ShimmerConfiguration

		public ShimmerConfiguration(string applicationName, string url, string projectName = null, FrameworkVersion frameworkVersion = FrameworkVersion.Net45)
		{
			this.projectName = projectName;
			ApplicationName = applicationName;
			FrameworkVersion = frameworkVersion;

			UrlOrPath = !SystemInspector.Debugger.IsAttached ? CompleteUrl(url) : UrlOrDebugPath(url);
		}
开发者ID:matteomigliore,项目名称:HSDK,代码行数:8,代码来源:ShimmerConfiguration.cs


示例8: CommandLineArguments

        public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree, FrameworkVersion version)
        {
            Console.WriteLine(pathToBuildFile);
            Console.WriteLine(buildEngine);
            Console.WriteLine(packageTree);
            Console.WriteLine(version);

            return string.Empty;
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:9,代码来源:BuildToolStub.cs


示例9: UpdateInfo

        protected UpdateInfo(ReleaseEntry currentlyInstalledVersion, IEnumerable<ReleaseEntry> releasesToApply, string packageDirectory, FrameworkVersion appFrameworkVersion)
        {
            // NB: When bootstrapping, CurrentlyInstalledVersion is null!
            CurrentlyInstalledVersion = currentlyInstalledVersion;
            ReleasesToApply = releasesToApply ?? Enumerable.Empty<ReleaseEntry>();
            FutureReleaseEntry = ReleasesToApply.MaxBy(x => x.Version).FirstOrDefault();
            AppFrameworkVersion = appFrameworkVersion;

            this.packageDirectory = packageDirectory;
        }
开发者ID:heinrichbreedt,项目名称:Shimmer,代码行数:10,代码来源:UpdateInfo.cs


示例10: GetFrameworkVersionForBuildTool

        public string GetFrameworkVersionForBuildTool(FrameworkVersion version)
        {
            switch (version)
            {
                case FrameworkVersion.FrameworkVersion2:
                    return "2.0";
                case FrameworkVersion.FrameworkVersion35:
                    return "3.5";
            }

            throw new InvalidEnumArgumentException("Invalid Framework Version", (int)version, typeof(FrameworkVersion));
        }
开发者ID:kkozmic,项目名称:horn_src,代码行数:12,代码来源:PhantomBuildTool.cs


示例11: GetFrameworkVersionForBuildTool

 public string GetFrameworkVersionForBuildTool(FrameworkVersion version)
 {
     switch (version)
     {
         case FrameworkVersion.FrameworkVersion2:
             return "v2.0";
         case FrameworkVersion.FrameworkVersion35:
             return "v3.5";
         default:
             throw new ArgumentException(string.Format("Unknown framework Version: {0}", version));
     }
 }
开发者ID:emmekappa,项目名称:horn_src,代码行数:12,代码来源:MSBuildBuildTool.cs


示例12: BuildEngine

 public BuildEngine(IBuildTool buildTool, string buildFile, FrameworkVersion version, IDependencyDispatcher dependencyDispatcher)
 {
     BuildTool = buildTool;
     BuildFile = buildFile;
     Version = version;
     Dependencies = new List<Dependency>();
     Exclusions = new List<string>();
     this.dependencyDispatcher = dependencyDispatcher;
     Modes = new Dictionary<string, IModeSettings>();
     var defaultMode = new ModeSettings( DefaultModeName );
     Modes.Add( DefaultModeName, defaultMode );
     CurrentModeSettings = defaultMode;
 }
开发者ID:emmekappa,项目名称:horn_src,代码行数:13,代码来源:BuildEngine.cs


示例13: MethodWriter

 public MethodWriter(GenerationManifest artifacts, FrameworkVersion version, MethodInfoWrapper methodInfo)
     : base(artifacts, version, methodInfo)
 {
     this._methodInfo = methodInfo;
     // true when this is an Async method and the unity version is present
     this._unityVersionOfAsyncExists = NDocUtilities.FindDocumentationUnityAsync(Artifacts.NDocForPlatform("unity"), methodInfo) != null;
     // refer to asynchronous versions if the synchronous version doesn't exist but the async version does
     this._referAsyncAlternativeUnity = (NDocUtilities.FindDocumentationUnityAsyncAlternative(Artifacts.NDocForPlatform("unity"), methodInfo) != null) &&
         (Artifacts.NDocForPlatform("unity") != null) &&
         (NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("unity"), methodInfo) == null);
     this._referAsyncAlternativePCL = (NDocUtilities.FindDocumentationPCLAsyncAlternative(Artifacts.NDocForPlatform("pcl"), methodInfo) != null) &&
         (Artifacts.NDocForPlatform("pcl") != null) &&
         (NDocUtilities.FindDocumentation(Artifacts.NDocForPlatform("pcl"), methodInfo) == null);
 }
开发者ID:aws,项目名称:aws-sdk-net,代码行数:14,代码来源:MethodWriter.cs


示例14: GeneratorProjectInfo

        private GeneratorProjectInfo(string target, string @out, IProjectGenerationError error)
        {
            this.Target = target;
            this.Out = @out;

            this.Language = CSharp.GetLanguage(CSharpVersion.V4);
            this.VisualStudioVersion = VisualStudioVersion.VS2013;
            this.frameworkVersion = FrameworkVersion.v4_5_2;
            this.IsDefaultFrameworkVersion = true;

            this.AddDocumentation = true;
            this.RenameInvalidMembers = true;

            this.Error = error;
        }
开发者ID:juancarlosbaezpozos,项目名称:JustDecompileEngine,代码行数:15,代码来源:GeneratorProjectInfo.cs


示例15: CommandLineArguments

        public string CommandLineArguments(string pathToBuildFile, BuildEngine buildEngine, IPackageTree packageTree,
            FrameworkVersion version)
        {
            var cmdLine = new StringBuilder();

            cmdLine.AppendFormat(
                     "{0} /p:OutputPath=\"{1}\"  /p:TargetFrameworkVersion={2} /p:NoWarn=1591 /consoleloggerparameters:Summary",
                     pathToBuildFile.QuotePath(), Path.Combine(packageTree.WorkingDirectory.FullName, buildEngine.BuildRootDirectory),
                     GetFrameworkVersionForBuildTool(version));

            AppendTasks(buildEngine, cmdLine);
            AppendParameters(buildEngine, cmdLine);

            return cmdLine.ToString();
        }
开发者ID:emmekappa,项目名称:horn_src,代码行数:15,代码来源:MSBuildBuildTool.cs


示例16: UpdateManager

        public UpdateManager(string urlOrPath, 
            string applicationName,
            FrameworkVersion appFrameworkVersion,
            string rootDirectory = null,
            IFileDownloader urlDownloader = null)
        {
            Contract.Requires(!String.IsNullOrEmpty(urlOrPath));
            Contract.Requires(!String.IsNullOrEmpty(applicationName));

            updateUrlOrPath = urlOrPath;
            this.applicationName = applicationName;
            this.appFrameworkVersion = appFrameworkVersion;

            this.rootAppDirectory = Path.Combine(rootDirectory ?? getLocalAppDataDirectory(), applicationName);

            this.urlDownloader = urlDownloader ?? new FileDownloader();
        }
开发者ID:peters,项目名称:Squirrel.Windows.Next,代码行数:17,代码来源:UpdateManager.cs


示例17: NativeImageExists

        public static bool NativeImageExists(string fileName, FrameworkVersion version, FrameworkArch arch)
        {
            string assymblyFolder = Path.Combine(Environment.ExpandEnvironmentVariables("%WInDir%"), "assembly");
            string nativeImageFileName = Path.GetFileNameWithoutExtension(fileName) + ".ni" + Path.GetExtension(fileName);
            string nativeImageFolderName = "NativeImages";

            if (FrameworkVersion.NetFX20 == version)
            {
                nativeImageFolderName += "_v2.0.50727";
            }
            else if (FrameworkVersion.NetFX40 == version)
            {
                // version number will keep changing up untill 4.0 RTM
                nativeImageFolderName += "_v4.0.*";
            }

            if (FrameworkArch.x86 == arch)
            {
                nativeImageFolderName += "_32";
            }
            else if (FrameworkArch.x64 == arch)
            {
                nativeImageFolderName += "_64";
            }

            // search for all directories matching the widcard to suppor 4.0
            DirectoryInfo directory = new DirectoryInfo(assymblyFolder);
            DirectoryInfo[] nativeImageDirectoryList = directory.GetDirectories(nativeImageFolderName);

            if (null == nativeImageDirectoryList || nativeImageDirectoryList.Length < 1)
            {
                return false;
            }

            FileInfo[] nativeImageFileList = nativeImageDirectoryList[0].GetFiles(nativeImageFileName, SearchOption.AllDirectories);
            if (null == nativeImageFileList || nativeImageFileList.Length < 1)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
开发者ID:zooba,项目名称:wix3,代码行数:44,代码来源:NetFXVerifier.cs


示例18: UpdateManager

        public UpdateManager(string urlOrPath, 
            string applicationName,
            FrameworkVersion appFrameworkVersion,
            string rootDirectory = null,
            IFileSystemFactory fileSystem = null,
            IUrlDownloader urlDownloader = null)
        {
            Contract.Requires(!String.IsNullOrEmpty(urlOrPath));
            Contract.Requires(!String.IsNullOrEmpty(applicationName));

            log = LogManager.GetLogger<UpdateManager>();

            updateUrlOrPath = urlOrPath;
            this.applicationName = applicationName;
            this.appFrameworkVersion = appFrameworkVersion;

            this.rootAppDirectory = Path.Combine(rootDirectory ?? getLocalAppDataDirectory(), applicationName);
            this.fileSystem = fileSystem ?? AnonFileSystem.Default;

            this.urlDownloader = urlDownloader ?? new DirectUrlDownloader(fileSystem);
        }
开发者ID:shiftkey,项目名称:Shimmer,代码行数:21,代码来源:UpdateManager.cs


示例19: UpdateManager

        public UpdateManager(string urlOrPath, 
            string applicationName,
            FrameworkVersion appFrameworkVersion,
            string rootDirectory = null,
            IFileSystemFactory fileSystem = null,
            IUrlDownloader urlDownloader = null)
        {
            Contract.Requires(!String.IsNullOrEmpty(urlOrPath));
            Contract.Requires(!String.IsNullOrEmpty(applicationName));

            // XXX: ALWAYS BE LOGGING
            log = new WrappingFullLogger(new FileLogger(applicationName), typeof(UpdateManager));

            updateUrlOrPath = urlOrPath;
            this.applicationName = applicationName;
            this.appFrameworkVersion = appFrameworkVersion;

            this.rootAppDirectory = Path.Combine(rootDirectory ?? getLocalAppDataDirectory(), applicationName);
            this.fileSystem = fileSystem ?? AnonFileSystem.Default;

            this.urlDownloader = urlDownloader ?? new DirectUrlDownloader(fileSystem);
        }
开发者ID:KyleGobel,项目名称:Shimmer,代码行数:22,代码来源:UpdateManager.cs


示例20: GetToolsVersionXml

 protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion)
 {
     switch (frameworkVersion)
     {
         case FrameworkVersion.v3_5:
             return "ToolsVersion=\"3.5\"";
         case FrameworkVersion.v3_0:
             return "ToolsVersion=\"3.0\"";
         default:
             return "ToolsVersion=\"2.0\"";
     }
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:12,代码来源:VS2008Target.cs



注:本文中的FrameworkVersion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Freezable类代码示例发布时间:2022-05-24
下一篇:
C# FrameworkUI类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap