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


C# ApplicationType类代码示例

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


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


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