当前位置: 首页>>代码示例>>C#>>正文


C# FrameworkVersion类代码示例

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


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


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