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

C# RoleName类代码示例

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

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



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

示例1: Role

 public RoleName Role(string name)
 {
     if (_roles.Exists(r => r.Name == name)) throw new ArgumentException("non-unique role name " + name);
     var roleName = new RoleName(name);
     _roles = _roles.Add(roleName);
     return roleName;
 }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:7,代码来源:MultiNodeSpec.cs


示例2: DeployOn

 public void DeployOn(RoleName role, string deployment)
 {
     ImmutableList<string> roleDeployments;
     _deployments.TryGetValue(role, out roleDeployments);
     _deployments = _deployments.SetItem(role,
         roleDeployments == null ? ImmutableList.Create(deployment) : roleDeployments.Add(deployment));
 }
开发者ID:MaciekLesiczka,项目名称:akka.net,代码行数:7,代码来源:MultiNodeSpec.cs


示例3: Join

 private void Join(RoleName from, RoleName to)
 {
     RunOn(() =>
     {
         Cluster.Join(Node(to).Address);
         CreateSingleton();
     }, from);
 }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:8,代码来源:ClusterSingletonManagerLeaveSpec.cs


示例4: ExcludeRole

 /// <summary>
 /// Excludes the role.
 /// </summary>
 /// <param name="query">The query.</param>
 /// <param name="roleName">Name of the role.</param>
 /// <returns></returns>
 public static IQueryable<User> ExcludeRole(this IQueryable<User> query, RoleName? roleName)
 {
     if (roleName.HasValue)
     {
         var exclude = new string[] { roleName.Value.ToString() };
         query = query.Where(u => u.UserRoles.Select(ur => ur.Role.RoleName).Except(exclude).Any());
     }
     return query;
 }
开发者ID:rickeygalloway,项目名称:Test,代码行数:15,代码来源:UserQueryExtensions.cs


示例5: Join

 private void Join(RoleName from, RoleName to)
 {
     RunOn(() =>
     {
         Cluster.Join(Node(to).Address);
         ClusterClientReceptionist.Get(Sys);
     }, from);
     EnterBarrier(from.Name + "-joined");
 }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:9,代码来源:ClusterClientStopSpec.cs


示例6: RoundRobinMultiNodeConfig

        public RoundRobinMultiNodeConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");
            Fourth = Role("fourth");

            CommonConfig = DebugConfig(true);

            DeployOnAll(@"
      /service-hello {
        router = round-robin-pool
        nr-of-instances = 3
        target.nodes = [""@[email protected]"", ""@[email protected]"", ""@[email protected]""]
      }
      /service-hello2 {
        router = round-robin-pool
        target.nodes = [""@[email protected]"", ""@[email protected]"", ""@[email protected]""]
      }
      /service-hello3 {
        router = round-robin-group
        routees.paths = [
          ""@[email protected]/user/target-first"",
          ""@[email protected]/user/target-second"",
          ""@[email protected]/user/target-third""]
      }
           ");
        }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:28,代码来源:RemoteRoundRobinSpec.cs


示例7: ClusterClientSpecConfig

        public ClusterClientSpecConfig()
        {
            Client = Role("client");
            First = Role("first");
            Second = Role("second");
            Third = Role("third");
            Fourth = Role("fourth");

            CommonConfig = ConfigurationFactory.ParseString(@"
                akka.loglevel = DEBUG
                akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster""
                akka.remote.log-remote-lifecycle-events = off
                akka.cluster.auto-down-unreachable-after = 0s
                akka.cluster.client.heartbeat-interval = 1s
                akka.cluster.client.acceptable-heartbeat-pause = 3s
                akka.cluster.client.refresh-contacts-interval = 1s
                # number-of-contacts must be >= 4 because we shutdown all but one in the end
                akka.cluster.client.receptionist.number-of-contacts = 4
                akka.cluster.client.receptionist.heartbeat-interval = 10s
                akka.cluster.client.receptionist.acceptable-heartbeat-pause = 10s
                akka.cluster.client.receptionist.failure-detection-interval = 1s
                akka.test.filter-leeway = 10s
            ")
            .WithFallback(ClusterClientReceptionist.DefaultConfig())
            .WithFallback(DistributedPubSub.DefaultConfig());

            TestTransport = true;
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:28,代码来源:ClusterClientSpec.cs


示例8: ConsistentHashingRouterMultiNodeConfig

        public ConsistentHashingRouterMultiNodeConfig()
        {
            _first = Role("first");
            _second = Role("second");
            _third = Role("third");

            CommonConfig = MultiNodeLoggingConfig.LoggingConfig.WithFallback(DebugConfig(true))
                .WithFallback(ConfigurationFactory.ParseString(@"
                    common-router-settings = {
                        router = consistent-hashing-pool
                        nr-of-instances = 10
                        cluster {
                            enabled = on
                            max-nr-of-instances-per-node = 2
                        }
                    }
                    akka.actor.deployment {
                    /router1 = ${common-router-settings}
                    /router3 = ${common-router-settings}
                    /router4 = ${common-router-settings}
                    }
                    akka.cluster.publish-stats-interval = 5s
                "))
                .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:25,代码来源:ClusterConsistentHashingRouterSpec.cs


示例9: LookupRemoteActorMultiNetSpec

        public LookupRemoteActorMultiNetSpec()
        {
            CommonConfig = DebugConfig(false);

            Master = Role("master");
            Slave = Role("slave");
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:7,代码来源:LookupRemoteActorMultiNetSpec.cs


示例10: JoinWithOfflineSeedNodeConfig

        public JoinWithOfflineSeedNodeConfig()
        {
            Seed = Role("seed");
            NonSeed = Role("nonseed");

            CommonConfig = DebugConfig(false).WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:7,代码来源:JoinWithOfflineSeedNodeSpec.cs


示例11: NodeUpConfig

        public NodeUpConfig()
        {
            First = Role("first");
            Second = Role("second");

            CommonConfig = DebugConfig(false)
                .WithFallback(MultiNodeClusterSpec.ClusterConfigWithFailureDetectorPuppet());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:8,代码来源:NodeUpSpec.cs


示例12: NodeMembershipSpecConfig

        public NodeMembershipSpecConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = MultiNodeClusterSpec.ClusterConfigWithFailureDetectorPuppet();
        }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:8,代码来源:NodeMembershipSpec.cs


示例13: ClusterConsistentHashingGroupSpecConfig

        public ClusterConsistentHashingGroupSpecConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = DebugConfig(false)
                .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:9,代码来源:ClusterConsistentHashingGroupSpec.cs


示例14: MembershipChangeListenerUpConfig

        public MembershipChangeListenerUpConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = DebugConfig(false)
                .WithFallback(MultiNodeClusterSpec.ClusterConfigWithFailureDetectorPuppet());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:9,代码来源:MembershipChangeListenerUpSpec.cs


示例15: ClientDowningNodeThatIsUnreachableMultiNodeConfig

        public ClientDowningNodeThatIsUnreachableMultiNodeConfig(bool failureDetectorPuppet)
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");
            Fourth = Role("fourth");

            CommonConfig= DebugConfig(false).WithFallback(MultiNodeClusterSpec.ClusterConfig(failureDetectorPuppet));
        }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:9,代码来源:ClientDowningNodeThatIsUnreachableSpec.cs


示例16: MinMembersBeforeUpSpecConfig

        public MinMembersBeforeUpSpecConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = ConfigurationFactory.ParseString(@"
                akka.cluster.min-nr-of-members = 3
            ").WithFallback(MultiNodeClusterSpec.ClusterConfigWithFailureDetectorPuppet());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:10,代码来源:MinMembersBeforeUpSpec.cs


示例17: NodeDowningAndBeingRemovedSpecSpecConfig

        public NodeDowningAndBeingRemovedSpecSpecConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = DebugConfig(false)
                .WithFallback(ConfigurationFactory.ParseString("akka.cluster.auto-down-unreachable-after = off"))
                .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:10,代码来源:NodeDowningAndBeingRemovedSpec.cs


示例18: UnreachableNodeJoinsAgainConfig

 public UnreachableNodeJoinsAgainConfig()
 {
     First = Role("first");
     Second = Role("second");
     Third = Role("third");
     Fourth = Role("fourth");
     CommonConfig = ConfigurationFactory.ParseString("akka.remote.log-remote-lifecycle-events = off")
         .WithFallback(DebugConfig(false)).WithFallback(MultiNodeClusterSpec.ClusterConfig());
     TestTransport = true; // need to use the throttler and blackhole
 }
开发者ID:rogeralsing,项目名称:akka.net,代码行数:10,代码来源:UnreachableNodeJoinsAgainSpec.cs


示例19: RestartNodeSpecConfig

        public RestartNodeSpecConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = DebugConfig(true)
                .WithFallback(ConfigurationFactory.ParseString(@"akka.cluster.auto-down-unreachable-after = 5s"))
                .WithFallback(MultiNodeClusterSpec.ClusterConfig());
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:10,代码来源:RestartNodeSpec.cs


示例20: AttemptSysMsgRedeliverySpecConfig

        public AttemptSysMsgRedeliverySpecConfig()
        {
            First = Role("first");
            Second = Role("second");
            Third = Role("third");

            CommonConfig = DebugConfig(false)
                .WithFallback(MultiNodeClusterSpec.ClusterConfig());

            TestTransport = true;
        }
开发者ID:Micha-kun,项目名称:akka.net,代码行数:11,代码来源:AttemptSysMsgRedeliverySpec.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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