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

C# Capo类代码示例

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

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



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

示例1: Deserialize

 public override void Deserialize(Deserializer deserializer)
 {
     base.Deserialize(deserializer);
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         deserializer.Read(out message_);
     }
 }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:9,代码来源:HeadFirst.cs


示例2: TestCreation

        public void TestCreation()
        {
            var fp = new Fingerprint(7);

            var window = new Capo<bool>(fp, 0);
            Assert.AreEqual(7, window.Length);

            window = new Capo<bool>(fp, 3);
            Assert.AreEqual(4, window.Length);

            // Invalid offset initialization attempt never throws
            Assert.DoesNotThrow(() => { window = new Capo<bool>(fp, 7); });
        }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:13,代码来源:CapoTests.cs


示例3: GetHashCode

 public override int GetHashCode(Fingerprint fingerprint)
 {
     var hash = new Hash(base.GetHashCode(fingerprint));
     if (fingerprint.Length <= tag.Offset)
     {
         return hash.Code;
     }
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         hash.Update(name);
     }
     return hash.Code;
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:14,代码来源:LinkClose.cs


示例4: TestCapoing

        public void TestCapoing()
        {
            var fp = new Fingerprint(8);
            fp.Touch(2);
            fp.Touch(4);

            var window = new Capo<bool>(fp, 3);
            Assert.False(window[0]);
            Assert.True(window[1]);
            Assert.False(window[2]);

            fp.Wipe(4);
            Assert.False(window[1]);

            // Out-of-range indexing never throws
            Assert.False(window[-8]);
            Assert.False(window[8]);
        }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:18,代码来源:CapoTests.cs


示例5: IsEquivalent

 protected override bool IsEquivalent(Cell other, Fingerprint fingerprint)
 {
     if (!base.IsEquivalent(other, fingerprint))
     {
         return false;
     }
     LinkSessionConnected o = (LinkSessionConnected)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (linkName_ != o.linkName_)
         {
             return false;
         }
     }
     if (touched[1])
     {
         if (result_ != o.result_)
         {
             return false;
         }
     }
     if (touched[2])
     {
         if (context_ != o.context_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:jaykang920,项目名称:x2clr,代码行数:31,代码来源:LinkEvents.cs


示例6: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     SampleEvent1 o = (SampleEvent1)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (foo_ != o.foo_)
         {
             return false;
         }
     }
     if (touched[1])
     {
         if (bar_ != o.bar_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:24,代码来源:Sample.cs


示例7: Load

 public override void Load(x2.Buffer buffer)
 {
     base.Load(buffer);
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         buffer.Read(out result_);
     }
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:9,代码来源:Events.cs


示例8: GetHashCode

 public override int GetHashCode(Fingerprint fingerprint)
 {
     var hash = new Hash(base.GetHashCode(fingerprint));
     if (fingerprint.Length <= tag.Offset)
     {
         return hash.Code;
     }
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         hash.Update(linkName_);
     }
     if (touched[1])
     {
         hash.Update(handle_);
     }
     if (touched[2])
     {
         hash.Update(context_);
     }
     return hash.Code;
 }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:22,代码来源:SocketLinkEvents.cs


示例9: IsEquivalent

 protected override bool IsEquivalent(Cell other, Fingerprint fingerprint)
 {
     if (!base.IsEquivalent(other, fingerprint))
     {
         return false;
     }
     TestReq o = (TestReq)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (serial_ != o.serial_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:jaykang920,项目名称:x2clr,代码行数:17,代码来源:SessionRecovery.cs


示例10: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     HandshakeResp o = (HandshakeResp)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (data_ != o.data_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:17,代码来源:LinkEvents.cs


示例11: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     TimeoutEvent o = (TimeoutEvent)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if ((object)key != null)
         {
             if (key is Cell)
             {
                 if (!((Cell)key).IsEquivalent((Cell)o.key))
                 {
                     return false;
                 }
             }
             else
             {
                 if (!key.Equals(o.key))
                 {
                     return false;
                 }
             }
         }
         else if ((object)o.key != null)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:34,代码来源:TimeFlowEvents.cs


示例12: IsEquivalent

 protected override bool IsEquivalent(Cell other, Fingerprint fingerprint)
 {
     if (!base.IsEquivalent(other, fingerprint))
     {
         return false;
     }
     SampleCell3 o = (SampleCell3)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (qux_ != o.qux_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:jaykang920,项目名称:x2clr,代码行数:17,代码来源:Sample.cs


示例13: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     TimeoutEvent o = (TimeoutEvent)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (key_ != o.key_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:17,代码来源:BuiltinEvents.cs


示例14: IsEquivalent

 protected override bool IsEquivalent(Cell other, Fingerprint fingerprint)
 {
     if (!base.IsEquivalent(other, fingerprint))
     {
         return false;
     }
     HelloResp o = (HelloResp)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (result_ != o.result_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:jaykang920,项目名称:x2clr,代码行数:17,代码来源:HelloWorld.cs


示例15: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     LinkSessionRecovered o = (LinkSessionRecovered)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (linkName_ != o.linkName_)
         {
             return false;
         }
     }
     if (touched[1])
     {
         if (handle_ != o.handle_)
         {
             return false;
         }
     }
     if (touched[2])
     {
         if (context_ != o.context_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:gitter-badger,项目名称:x2clr,代码行数:31,代码来源:SocketLinkEvents.cs


示例16: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     HeartbeatEvent o = (HeartbeatEvent)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (timestamp_ != o.timestamp_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:17,代码来源:HeartbeatEvent.cs


示例17: IsEquivalent

 protected override bool IsEquivalent(Cell other, Fingerprint fingerprint)
 {
     if (!base.IsEquivalent(other, fingerprint))
     {
         return false;
     }
     TimeoutEvent o = (TimeoutEvent)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (key_ != o.key_)
         {
             return false;
         }
     }
     if (touched[1])
     {
         if (intParam_ != o.intParam_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:jaykang920,项目名称:x2clr,代码行数:24,代码来源:BuiltinEvents.cs


示例18: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     LinkClose o = (LinkClose)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (name != o.name)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:17,代码来源:LinkClose.cs


示例19: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     LinkSessionDisconnected o = (LinkSessionDisconnected)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (linkName != o.linkName)
         {
             return false;
         }
     }
     if (touched[1])
     {
         if (result != o.result)
         {
             return false;
         }
     }
     if (touched[2])
     {
         if (context != o.context)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:31,代码来源:LinkSessionDisconnected.cs


示例20: IsEquivalent

 public override bool IsEquivalent(Cell other)
 {
     if (!base.IsEquivalent(other))
     {
         return false;
     }
     CapitalizeResp o = (CapitalizeResp)other;
     var touched = new Capo<bool>(fingerprint, tag.Offset);
     if (touched[0])
     {
         if (result_ != o.result_)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:nice1378,项目名称:x2clr,代码行数:17,代码来源:Events.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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