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

C# Authentication类代码示例

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

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



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


示例16: WebDAVModule

        /// <summary>
        /// WebDAV Http Module
        /// </summary>
        /// <param name="sourceAssembly">
        /// Assembly containing the base class implementations
        /// </param>
        /// <param name="moduleAuthentication">
        /// Authentication to use during requests
        /// </param>
        public WebDAVModule(Assembly sourceAssembly, Authentication moduleAuthentication)
        {
            this.ModuleAuthentication = moduleAuthentication;
            this.WebDavProcessor = new WebDavProcessor(sourceAssembly);

            //Set the default
            this.DebugFilePath = Settings.Default.WebDAVDebugOutputFilePath;
        }
开发者ID:atallo,项目名称:webdavserver,代码行数:17,代码来源:WebDAVModule.cs


示例17: SignInRedirect

        public void SignInRedirect()
        {
            // Create an instance of Yahoo.Authentication
            Yahoo.Authentication auth = new Authentication("myappid", "mysharedsecret");

            // Redirect the user to the use sign-in page
            Response.Redirect(auth.GetUserLogOnAddress().ToString());
        }
开发者ID:Mickey-P,项目名称:SmallSharpToolsDotNet,代码行数:8,代码来源:BBAuth1Sample.cs


示例18: Build

		public override Authentication Build()
		{
			Support.LogMethodEntry();
			Asserts.NotEmptyOrNull (phoneNumber, "phoneNumber");
			Authentication result = new Authentication(phoneNumber);
			Support.LogMethodExit(result);
			return result;
		}
开发者ID:janstadt,项目名称:esl.sdk.net,代码行数:8,代码来源:SMSAuthenticationBuilder.cs


示例19: Authenticate_Valid_XML_ReturnsTrue

 public void Authenticate_Valid_XML_ReturnsTrue()
 {
     var authentication = new Authentication();
     authentication.Authenticate(MonitisAccountInformation.Login, MonitisAccountInformation.Password, OutputType.XML);
     Assert.IsTrue((
         MonitisAccountInformation.ApiKey == authentication.apiKey&&
         MonitisAccountInformation.SekretKey == authentication.secretKey&&
         !string.IsNullOrEmpty(authentication.authToken)), "Authenticate (XML output) returns invalid value.");
 }
开发者ID:flin-aa,项目名称:Windows-Monitoring-Scripts,代码行数:9,代码来源:AuthenticationTests.cs


示例20: RestController

 public RestController(string strUserAgent = "BauRest", int intTimeOut = 20000, Authentication.IAuthenticator objAuthenticator = null)
 {
     // Asigna las propiedades
         UserAgent = strUserAgent;
         TimeOut = intTimeOut;
         Authenticator = objAuthenticator;
     // Inicializa los objetos
         Proxy = new Proxies.ProxyData(null, null, null, true);
 }
开发者ID:gitter-badger,项目名称:BauTwitter,代码行数:9,代码来源:RestController.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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