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


C# Authentication类代码示例

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


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

示例1: Develop_branch

 public void Develop_branch()
 {
     var authentication = new Authentication();
     var versionBuilder = new TeamCity(authentication);
     var tcVersion = versionBuilder.GenerateSetVersionMessage("0.0.0-Unstable4");
     Assert.AreEqual("##teamcity[buildNumber '0.0.0-Unstable4']", tcVersion);
 }
开发者ID:Wikell,项目名称:GitVersion,代码行数:7,代码来源:TeamCityTests.cs

示例2: EscapeValues

 public void EscapeValues()
 {
     var authentication = new Authentication();
     var versionBuilder = new MyGet(authentication);
     var message = versionBuilder.GenerateSetParameterMessage("Foo", "0.8.0-unstable568 Branch:'develop' Sha:'ee69bff1087ebc95c6b43aa2124bd58f5722e0cb'");
     Assert.AreEqual("##myget[setParameter name='GitVersion.Foo' value='0.8.0-unstable568 Branch:|'develop|' Sha:|'ee69bff1087ebc95c6b43aa2124bd58f5722e0cb|'']", message[0]);
 }
开发者ID:Wikell,项目名称:GitVersion,代码行数:7,代码来源:MyGetTests.cs

示例3: Build

		public virtual Authentication Build()
		{
			Support.LogMethodEntry();
			Authentication result = new Authentication(AuthenticationMethod.EMAIL);
			Support.LogMethodExit(result);
			return result;
		}
开发者ID:janstadt,项目名称:esl.sdk.net,代码行数:7,代码来源:AuthenticationBuilder.cs

示例4: BuildNumber

 public void BuildNumber()
 {
     var authentication = new Authentication();
     var versionBuilder = new MyGet(authentication);
     var message = versionBuilder.GenerateSetParameterMessage("LegacySemVerPadded", "0.8.0-unstable568");
     Assert.AreEqual("##myget[buildNumber '0.8.0-unstable568']", message[1]);
 }
开发者ID:Wikell,项目名称:GitVersion,代码行数:7,代码来源:MyGetTests.cs

示例5: Develop_branch

 public void Develop_branch()
 {
     var authentication = new Authentication();
     var versionBuilder = new MyGet(authentication);
     var message = versionBuilder.GenerateSetVersionMessage("0.0.0-Unstable4");
     Assert.AreEqual(null, message);
 }
开发者ID:Wikell,项目名称:GitVersion,代码行数:7,代码来源:MyGetTests.cs

示例6: GenerateBuildVersion

 public void GenerateBuildVersion()
 {
     var authentication = new Authentication();
     var versionBuilder = new ContinuaCi(authentication);
     var continuaCiVersion = versionBuilder.GenerateSetVersionMessage("0.0.0-Beta4.7");
     Assert.AreEqual("@@continua[setBuildVersion value='0.0.0-Beta4.7']", continuaCiVersion);
 }
开发者ID:Wikell,项目名称:GitVersion,代码行数:7,代码来源:ContinuaCiTests.cs

示例7: TestInitialize

 public void TestInitialize()
 {
     _testTarget = new Authentication();
     _sucessfulAuthenticationRequests = new TestAuthenticationRequests();
     _testTarget.AuthenticationRequestInterface = _sucessfulAuthenticationRequests;
     
 }
开发者ID:bobtjanitor,项目名称:bob-the-janitor-sample-code,代码行数:7,代码来源:Authentication_Tests.cs

示例8: TryGetVersion

    public static bool TryGetVersion(string directory, out SemanticVersion versionAndBranch)
    {
        var gitDirectory = GitDirFinder.TreeWalkForGitDir(directory);

        if (string.IsNullOrEmpty(gitDirectory))
        {
            var message =
                "No .git directory found in provided solution path. This means the assembly may not be versioned correctly. " +
                "To fix this warning either clone the repository using git or remove the `GitVersionTask` nuget package. " +
                "To temporarily work around this issue add a AssemblyInfo.cs with an appropriate `AssemblyVersionAttribute`. " +
                "If it is detected that this build is occurring on a CI server an error may be thrown.";
            Logger.WriteWarning(message);
            versionAndBranch = null;
            return false;
        }

        if (!processedDirectories.Contains(directory))
        {
            processedDirectories.Add(directory);
            var authentication = new Authentication();
            foreach (var buildServer in BuildServerList.GetApplicableBuildServers(authentication))
            {
                Logger.WriteInfo(string.Format("Executing PerformPreProcessingSteps for '{0}'.", buildServer.GetType().Name));
                buildServer.PerformPreProcessingSteps(gitDirectory);
            }
        }
        versionAndBranch = VersionCache.GetVersion(gitDirectory);
        return true;
    }
开发者ID:hbre,项目名称:GitVersion,代码行数:29,代码来源:VersionAndBranchFinder.cs

示例9: CreateCustomMonitor

        public void CreateCustomMonitor()
        {
            authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey,
                                              secretKey: MonitisAccountInformation.SekretKey);
            customMonitor = new CustomMonitor();
            customMonitor.SetAuthenticationParams(authentication);
            agent = new CustomUserAgent();
            agent.SetAuthenticationParams(authentication);

            var a1 = agent.AddAgent("TestAgent1" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON);
            _agentID = JObject.Parse(a1.Content).Value<int>("data");

            customMonitor = new CustomMonitor();
            customMonitor.SetAuthenticationParams(authentication);

            MonitorParameter param = new MonitorParameter("param1", "param1d", "val", DataType.String, false);
            MonResultParameter resParam = new MonResultParameter("MonResparam1", "MonResparam1d", "MonResval",
                                                                 DataType.String);
            MonResultParameter resAddParam = new MonResultParameter("MonAddResparam1", "MonAddResparam1d",
                                                                    "MonAddResval", DataType.String);

            var s = customMonitor.AddMonitor(_agentID, TestCustomMonitorName + DateTime.Now.Ticks.ToString(), "Test", "internal",
                                             new List<MonitorParameter>() { param },
                                             new List<MonResultParameter>() { resParam },
                                             new List<MonResultParameter>() { resAddParam });
            _customMonitorID = JObject.Parse(s.Content).Value<int>("data");

            GetTestMonitor();
        }
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:29,代码来源:CustomMonitorTests.cs

示例10: AuthenticationArgs

 /// <summary>
 /// Authentication event arguments
 /// </summary>
 /// <param name="requestUri"></param>
 /// <param name="realm"></param>
 /// <param name="authType"></param>
 internal AuthenticationArgs(Uri requestUri, string realm, Authentication authType)
 {
     this.Realm = realm;
     this.AuthType = authType;
     this.RequestUri = requestUri;
     this.ProcessAuthorization = true;
 }
开发者ID:atallo,项目名称:webdavserver,代码行数:13,代码来源:AuthenticationArgs.cs

示例11: Build

		public override Authentication Build()
		{
			Asserts.NotEmptyOrNull (phoneNumber, "phoneNumber");
			Authentication result = new Authentication(phoneNumber);

			return result;
		}
开发者ID:vtcharlie,项目名称:esl.sdk.net,代码行数:7,代码来源:SMSAuthenticationBuilder.cs

示例12: GetVersion

    public static VersionVariables GetVersion(string directory, Authentication authentication, bool noFetch, IFileSystem fileSystem)
    {
        var gitDir = GitDirFinder.TreeWalkForDotGitDir(directory);
        using (var repo = RepositoryLoader.GetRepo(gitDir))
        {
            var ticks = DirectoryDateFinder.GetLastDirectoryWrite(directory);
            var key = string.Format("{0}:{1}:{2}", repo.Head.CanonicalName, repo.Head.Tip.Sha, ticks);

            CachedVersion result;
            if (versionCacheVersions.TryGetValue(key, out result))
            {
                if (result.Timestamp != ticks)
                {
                    Logger.WriteInfo("Change detected. flushing cache.");
                    result.VersionVariables = ExecuteCore.ExecuteGitVersion(fileSystem, null, null, authentication, null, noFetch, directory, null);
                }
                return result.VersionVariables;
            }
            Logger.WriteInfo("Version not in cache. Calculating version.");

            return (versionCacheVersions[key] = new CachedVersion
            {
                VersionVariables = ExecuteCore.ExecuteGitVersion(fileSystem, null, null, authentication, null, noFetch, directory, null),
                Timestamp = ticks
            }).VersionVariables;
        }
    }
开发者ID:nakioman,项目名称:GitVersion,代码行数:27,代码来源:VersionAndBranchFinder.cs

示例13: MatchingService

 public MatchingService()
 {
     dbContext = new ShowMeAroundContext();
     userDA = new UserDA();
     provider = new MatchingProvider();
     auth = new Authentication();
 }
开发者ID:valorl,项目名称:ShowMeAround,代码行数:7,代码来源:MatchingService.svc.cs

示例14: SetupConnection

        private static IEntityServices SetupConnection(int connectionId, string domainName)
        {
            ConnectionDto connection;

            using (var db = new TenantDb(ConnectionString.ForDomain(domainName)))
            {
                var conn = db.Connections.Single(x => x.ConnectionId == connectionId && x.IsActive);
                connection = new ConnectionDto
                {
                    ConnectionId = conn.ConnectionId,
                    Url = conn.Url.Trim(),
                    UserName = conn.UserName.Trim(),
                    Password = conn.Password.Trim()
                };
            }
            IAuthenticator authenticator = new Authentication();
            IOrganizationService organizationService = authenticator.Authenticate(new AuthenticationInformation
            {
                OrganizationUri = connection.Url,
                UserName = connection.UserName,
                Password = connection.Password
            });

            IEntityServices entityService = new EntityServices(organizationService);
            return entityService;
        }
开发者ID:antonioffranco,项目名称:mvc,代码行数:26,代码来源:CrmAdapter.cs

示例15: UserService

 public UserService()
 {
     userDA = new UserDA();
     sessionDA = new SessionDA();
     auth = new Authentication();
     interestDA = new InterestDA();
     languageDA = new LanguageDA();
 }
开发者ID:valorl,项目名称:ShowMeAround,代码行数:8,代码来源:UserService.svc.cs


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