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

C# ApplicationType类代码示例

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

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



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

示例1: OfficeApplicationObjectProvider

 public OfficeApplicationObjectProvider(object officeApplicationObject, ApplicationType applicationType)
 {
     // TODO: Complete member initialization
     this.officeApplicationObject = officeApplicationObject;
     m_bExternalApplication = officeApplicationObject != null;
     this.applicationType = applicationType;
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:OfficeApplicationObjectProvider.cs


示例2: SemanticConstraintRegistry

        /// <summary>
        /// Constructor
        /// </summary>
        public SemanticConstraintRegistry(FileFormatVersions format, ApplicationType appType)
        {
            _format = format;
            _appType = appType;

            Initialize();
        }
开发者ID:ErykJaroszewicz,项目名称:Open-XML-SDK,代码行数:10,代码来源:SemanticConstraintRegistry.cs


示例3: Element

 internal Element(BaseStorage storage, Guid obj, ApplicationType appType, int identifier)
 {
     _storage = storage;
     _obj = obj;
     _appType = appType;
     _identifier = identifier;
 }
开发者ID:alexcmd,项目名称:DiscUtils,代码行数:7,代码来源:Element.cs


示例4: SemanticValidator

        public SemanticValidator(FileFormatVersions format, ApplicationType app)
        {
            FileFormat = format;
            AppType = app;

            _curReg = new SemanticConstraintRegistry(format, app);
        }
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:7,代码来源:SemanticValidator.cs


示例5: Start

        internal static MonoProcess Start(ApplicationType type, string _targetExe)
        {
            if (type == ApplicationType.Desktopapplication)
                return new MonoDesktopProcess(_targetExe);
            if (type == ApplicationType.Webapplication)
                return new MonoWebProcess();

            throw new Exception("Unknown ApplicationType");
        }
开发者ID:techl,项目名称:MonoRemoteDebugger,代码行数:9,代码来源:MonoProcess.cs


示例6: RegisterConstraint

        /// <summary>
        /// Register a constraint to this registry.
        /// </summary>
        public void RegisterConstraint(int elementTypeID, int ancestorTypeID, FileFormatVersions fileFormat, ApplicationType appType, SemanticConstraint constraint )
        {
            if ((fileFormat & _format) == _format && (appType & _appType) == _appType)
            {

                AddConstraintToDic(constraint, ancestorTypeID, _cleanList);
                AddConstraintToDic(constraint, elementTypeID, _semConstraintMap);
            }
        }
开发者ID:ErykJaroszewicz,项目名称:Open-XML-SDK,代码行数:12,代码来源:SemanticConstraintRegistry.cs


示例7: HelloWorld

        public async Task HelloWorld(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, string applicationBaseUrl, ServerType delegateServer, ApplicationType applicationType)
        {
            var logger = new LoggerFactory()
                            .AddConsole()
                            .AddDebug()
                            .CreateLogger($"HelloWorld:{serverType}:{runtimeFlavor}:{architecture}:{delegateServer}");

            using (logger.BeginScope("HelloWorldTest"))
            {
                var deploymentParameters = new DeploymentParameters(Helpers.GetTestSitesPath(applicationType), serverType, runtimeFlavor, architecture)
                {
                    ApplicationBaseUriHint = applicationBaseUrl,
                    EnvironmentName = "HelloWorld", // Will pick the Start class named 'StartupHelloWorld',
                    ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null,
                    SiteName = "HttpTestSite", // This is configured in the Http.config
                    TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0",
                    ApplicationType = applicationType
                };

                using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, logger))
                {
                    var deploymentResult = deployer.Deploy();
                    var httpClientHandler = new HttpClientHandler();
                    var httpClient = new HttpClient(httpClientHandler)
                    {
                        BaseAddress = new Uri(deploymentResult.ApplicationBaseUri),
                        Timeout = TimeSpan.FromSeconds(5),
                    };

                    // Request to base address and check if various parts of the body are rendered & measure the cold startup time.
                    var response = await RetryHelper.RetryRequest(() =>
                    {
                        return httpClient.GetAsync(string.Empty);
                    }, logger, deploymentResult.HostShutdownToken, retryCount: 30);

                    var responseText = await response.Content.ReadAsStringAsync();
                    try
                    {
                        Assert.Equal("Hello World", responseText);

                        response = await httpClient.GetAsync("/Path%3F%3F?query");
                        responseText = await response.Content.ReadAsStringAsync();
                        Assert.Equal("/Path??", responseText);

                        response = await httpClient.GetAsync("/Query%3FPath?query?");
                        responseText = await response.Content.ReadAsStringAsync();
                        Assert.Equal("?query?", responseText);
                    }
                    catch (XunitException)
                    {
                        logger.LogWarning(response.ToString());
                        logger.LogWarning(responseText);
                        throw;
                    }
                }
            }
        }
开发者ID:aspnet,项目名称:IISIntegration,代码行数:57,代码来源:HelloWorldTest.cs


示例8: GetDefaultProgramDataFolder

		/// <summary>
		/// Get the directory for the default location of the CruiseControl.NET data files.
		/// </summary>
		/// <param name="application">Type of the application. E.g. Server or WebDashboard.</param>
		/// <returns>The location of the CruiseControl.NET data files.</returns>
		public string GetDefaultProgramDataFolder(ApplicationType application)
		{
            if (application == ApplicationType.Unknown)
            {
                throw new ArgumentOutOfRangeException("application");
            }

            var pgfPath = AppDomain.CurrentDomain.BaseDirectory;
            return pgfPath;
		}
开发者ID:BiYiTuan,项目名称:CruiseControl.NET,代码行数:15,代码来源:ExecutionEnvironment.cs


示例9: NonWindowsOS

 public async Task NonWindowsOS(
     ServerType serverType,
     RuntimeFlavor runtimeFlavor,
     RuntimeArchitecture architecture,
     ApplicationType applicationType,
     string applicationBaseUrl)
 {
     var smokeTestRunner = new SmokeTests(_logger);
     await smokeTestRunner.SmokeTestSuite(serverType, runtimeFlavor, architecture, applicationType, applicationBaseUrl);
 }
开发者ID:CarlSosaDev,项目名称:MusicStore,代码行数:10,代码来源:SmokeTests.cs


示例10: GetHandler

 public static INodeCartridge GetHandler(ApplicationType applicationType)
 {
     switch (applicationType)
     {
         case ApplicationType.Mono:
             return new MonoCartridge();
         default:
             throw new MonoscapeException("Unknown application type found");
     }
 }
开发者ID:virajs,项目名称:monoscape,代码行数:10,代码来源:NodeCartridgeFactory.cs


示例11: Application

 public Application(ApplicationType type, string applicant, string destacc, string destname, string memo)
 {
     AppType = type;
     Applicant = applicant;
     DestAcc = destacc;
     DestName = destname;
     Memo = memo;
     CreationTime = DateTime.Now;
     AppType = ApplicationType.APerson;
 }
开发者ID:WinHuStudio,项目名称:iTrip,代码行数:10,代码来源:Application.cs


示例12: Save

        public void Save(ApplicationType type)
        {
            if (type == ApplicationType.Application && MainFunc != null)
            {
                MethodInfo wrappedMain = WrapMain(MainFunc);
                _assemblyBuilder.SetEntryPoint(wrappedMain, PEFileKinds.ConsoleApplication);
            }

            SaveAssembly(_fileName, _assemblyBuilder);
        }
开发者ID:dubik,项目名称:csharprpp,代码行数:10,代码来源:CodeGenerator.cs


示例13: NtlmAuthenticationTest

        public async Task NtlmAuthenticationTest(ServerType serverType, RuntimeFlavor runtimeFlavor, RuntimeArchitecture architecture, ApplicationType applicationType, string applicationBaseUrl)
        {
            using (_logger.BeginScope("NtlmAuthenticationTest"))
            {
                var musicStoreDbName = DbUtils.GetUniqueName();

                var deploymentParameters = new DeploymentParameters(Helpers.GetApplicationPath(applicationType), serverType, runtimeFlavor, architecture)
                {
                    PublishApplicationBeforeDeployment = true,
                    TargetFramework = runtimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0",
                    ApplicationType = applicationType,
                    ApplicationBaseUriHint = applicationBaseUrl,
                    EnvironmentName = "NtlmAuthentication", //Will pick the Start class named 'StartupNtlmAuthentication'
                    ServerConfigTemplateContent = (serverType == ServerType.IISExpress) ? File.ReadAllText("NtlmAuthentation.config") : null,
                    SiteName = "MusicStoreNtlmAuthentication", //This is configured in the NtlmAuthentication.config
                    UserAdditionalCleanup = parameters =>
                    {
                        DbUtils.DropDatabase(musicStoreDbName, _logger);
                    }
                };

                // Override the connection strings using environment based configuration
                deploymentParameters.EnvironmentVariables
                    .Add(new KeyValuePair<string, string>(
                        MusicStore.StoreConfig.ConnectionStringKey,
                        DbUtils.CreateConnectionString(musicStoreDbName)));

                using (var deployer = ApplicationDeployerFactory.Create(deploymentParameters, _logger))
                {
                    var deploymentResult = deployer.Deploy();
                    var httpClientHandler = new HttpClientHandler() { UseDefaultCredentials = true };
                    var httpClient = new HttpClient(httpClientHandler) { BaseAddress = new Uri(deploymentResult.ApplicationBaseUri) };

                    // Request to base address and check if various parts of the body are rendered & measure the cold startup time.
                    var response = await RetryHelper.RetryRequest(async () =>
                    {
                        return await httpClient.GetAsync(string.Empty);
                    }, logger: _logger, cancellationToken: deploymentResult.HostShutdownToken);

                    Assert.False(response == null, "Response object is null because the client could not " +
                        "connect to the server after multiple retries");

                    var validator = new Validator(httpClient, httpClientHandler, _logger, deploymentResult);

                    Console.WriteLine("Verifying home page");
                    await validator.VerifyNtlmHomePage(response);

                    Console.WriteLine("Verifying access to store with permissions");
                    await validator.AccessStoreWithPermissions();

                    _logger.LogInformation("Variation completed successfully.");
                }
            }
        }
开发者ID:CarlSosaDev,项目名称:MusicStore,代码行数:54,代码来源:NtlmAuthentationTest.cs


示例14: NonWindowsOS

 public async Task NonWindowsOS(
     ServerType serverType,
     RuntimeFlavor runtimeFlavor,
     RuntimeArchitecture architecture,
     ApplicationType applicationType,
     string applicationBaseUrl,
     bool noSource)
 {
     var testRunner = new PublishAndRunTests(_logger);
     await testRunner.Publish_And_Run_Tests(
         serverType, runtimeFlavor, architecture, applicationType, applicationBaseUrl, noSource);
 }
开发者ID:Cream2015,项目名称:MusicStore,代码行数:12,代码来源:PublishAndRunTests.cs


示例15: CreateLogServerComponent

 public static LogServerComponent CreateLogServerComponent(ApplicationType appType,
                                                           LogServerComponentType logServer)
 {
     var ht = GetHost(appType, logServer.hostID);
     var component = new LogServerComponent(logServer.componentID, appType.applicationID, ht)
         {
             WorkingDir = logServer.workingDir,
             Port = logServer.port,
             HostName = ht.hostname
         };
     return component;
 }
开发者ID:ericstiles,项目名称:endeca-control,代码行数:12,代码来源:ComponentFactory.cs


示例16: InsertOrUpdate

        /// <summary>
        /// Function to save work detail.
        /// </summary>
        /// <param name="workDetail">work detail information</param>
        /// <param name="applicationType">Application type</param>
        public void InsertOrUpdate(WorkDetail workDetail, ApplicationType applicationType)
        {
            if (workDetail == null)
            {
                throw new ArgumentNullException(WorkDetailConst);
            }

            workDetail.Date = workDetail.Date.Date;
            workDetail.ApplicationID = (byte)applicationType;
            this.timesheetRepository.InsertOrUpdate(workDetail);
            this.unitOfWork.Save();
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:17,代码来源:TimesheetService.cs


示例17: GeneratePairedKey

 public static int GeneratePairedKey(string initialKey, ApplicationType appType)
 {
     string constantKey = "CashRegister2013";
     if (appType == ApplicationType.TaxCalculator)
     {
         constantKey = "TaxCalculator2014";
     }
     int hash = 23;
     hash = hash * 2 + initialKey.GetHashCode();
     hash = hash * 3 + constantKey.GetHashCode();
     hash = Math.Abs(hash);
     Debug.WriteLine("generated paired key: " + hash);
     return hash;
 }
开发者ID:ciprianx87,项目名称:basiccashbook,代码行数:14,代码来源:Utils.cs


示例18: CreateForgeComponent

 public static ForgeComponent CreateForgeComponent(ApplicationType appType, ForgeComponentType forge)
 {
     var ht = GetHost(appType, forge.hostID);
     var component = new ForgeComponent(forge.componentID, appType.applicationID, ht)
         {
             OutputDirectory = ResolveRelativePath(forge.workingDir, forge.outputDir),
             InputDirectory = ResolveRelativePath(forge.workingDir, forge.inputDir),
             LogDir = ResolveRelativePath(forge.workingDir, Path.GetDirectoryName(forge.logFile)),
             WorkingDir = forge.workingDir,
             DataPrefix = forge.outputPrefixName
         };
     LoadCustomProperties(component, forge);
     return component;
 }
开发者ID:ericstiles,项目名称:endeca-control,代码行数:14,代码来源:ComponentFactory.cs


示例19: Insert

        /// <summary>
        /// Inserts the specified work detail.
        /// </summary>
        /// <param name="workDetail">The work detail.</param>
        /// <param name="applicationType">Type of the application.</param>
        /// <returns>The total timesheet hours</returns>
        public decimal Insert(WorkDetail workDetail, ApplicationType applicationType)
        {
            if (workDetail == null)
            {
                throw new ArgumentNullException(WorkDetailConst);
            }

            workDetail.Date = workDetail.Date.Date;
            workDetail.ApplicationID = (byte)applicationType;
            var result = this.timesheetRepository.Insert(workDetail);
            this.unitOfWork.Save();

            return result;
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:20,代码来源:TimesheetService.cs


示例20: CreateDgidxComponent

 public static DgidxComponent CreateDgidxComponent(ApplicationType appType, DgidxComponentType dgidx)
 {
     var ht = GetHost(appType, dgidx.hostID);
     var component = new DgidxComponent(dgidx.componentID, appType.applicationID, ht)
         {
             WorkingDir = dgidx.workingDir,
             OutputDirectory = ResolveRelativePath(dgidx.workingDir,
                                                   RemovePrefixNameFromDir(dgidx.outputPrefix)),
             InputDirectory = ResolveRelativePath(dgidx.workingDir, RemovePrefixNameFromDir(dgidx.inputPrefix)),
             LogDir = ResolveRelativePath(dgidx.workingDir, Path.GetDirectoryName(dgidx.logFile)),
             DataPrefix = GetDataPrefixFromDir(dgidx.outputPrefix)
         };
     LoadCustomProperties(component, dgidx);
     return component;
 }
开发者ID:ericstiles,项目名称:endeca-control,代码行数:15,代码来源:ComponentFactory.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ApplicationUser类代码示例发布时间:2022-05-24
下一篇:
C# ApplicationSignInManager类代码示例发布时间: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