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

C# ICopyable类代码示例

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

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



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

示例1: SendMessage

 /// <summary>This methods send some ICopyable data to the remote address.
 /// </summary>
 /// <param name="remote_addr">Remote Nodes are referenced by their P2P
 /// Address, typically of type AHAddress.</param>
 /// <param name="data">This is an ICopyable object which contains the data
 /// to send.</param>
 public void SendMessage(Address remote_addr, ICopyable data) {
   // This instantiates a multi-use method to sending to the remote node,
   // though we will only use it once.  It is VERY similar to UDP.
   AHExactSender sender = new AHExactSender(_app_node.Node, remote_addr);
   // This is the process of actually sending the data.
   sender.Send(new CopyList(HW, data));
 }
开发者ID:pstjuste,项目名称:brunet,代码行数:13,代码来源:HelloWorldNodeDataHandler.cs


示例2: Copy

        public override object Copy(ICopyable zone)
        {
            ICopyable tmpZone = zone;
            CCSequence ret;

            if (tmpZone != null && tmpZone != null)
            {
                ret = tmpZone as CCSequence;
                if (ret == null)
                {
                    return null;
                }
				base.Copy(tmpZone);
				
				var param1 = m_pActions[0].Copy() as CCFiniteTimeAction;
				var param2 = m_pActions[1].Copy() as CCFiniteTimeAction;
				
				if (param1 == null || param2 == null)
				{
					return null;
				}
				
				ret.InitOneTwo(param1, param2);
				
				return ret;
            }
            else
            {
                return new CCSequence(this);
            }


        }
开发者ID:CartBlanche,项目名称:cocos2d-xna,代码行数:33,代码来源:CCSequence.cs


示例3: Copy

        public override object Copy(ICopyable zone)
        {

            if (zone != null)
            {
                var ret = zone as CCRepeat;
                if (ret == null)
                {
                    return null;
                }
                base.Copy(zone);
                
                var param = m_pInnerAction.Copy() as CCFiniteTimeAction;
                if (param == null)
                {
                    return null;
                }
                ret.InitWithAction(param, m_uTimes);
                
                return ret;
            }
            else
            {
                return new CCRepeat(this);
            }

        }
开发者ID:CartBlanche,项目名称:cocos2d-xna,代码行数:27,代码来源:CCRepeat.cs


示例4: Copy

        public override object Copy(ICopyable zone)
        {
            if (zone != null)
            {
                var ret = zone as CCRepeatForever;
                if (ret == null)
                {
                    return null;
                }
                base.Copy(zone);

                var param = m_pInnerAction.Copy() as CCActionInterval;
                if (param == null)
                {
                    return null;
                }
                ret.InitWithAction(param);

                return ret;
            }
            else
            {
                return new CCRepeatForever(this);
            }
        }
开发者ID:HarkDev,项目名称:cocos2d-xna,代码行数:25,代码来源:CCRepeatForever.cs


示例5: Copy

        public override object Copy(ICopyable zone)
        {

            if (zone != null)
            {
                var ret = zone as CCMoveBy;

                if (ret == null)
                {
                    return null;
                }

                base.Copy(zone);
                
                ret.InitWithDuration(m_fDuration, m_delta);
                
                return ret;
            }
            else
            {
                return new CCMoveBy(this);
            }


        }
开发者ID:CartBlanche,项目名称:cocos2d-xna,代码行数:25,代码来源:CCMoveBy.cs


示例6: Copy

        public override object Copy(ICopyable zone)
        {
            if (zone != null)
            {
                var ret = zone as CCSpawn;
                if (ret == null)
                {
                    return null;
                }
                base.Copy(zone);

                var param1 = m_pOne.Copy() as CCFiniteTimeAction;
                var param2 = m_pTwo.Copy() as CCFiniteTimeAction;
                if (param1 == null || param2 == null)
                {
                    return null;
                }

                ret.InitOneTwo(param1, param2);

                return ret;
            }
            else
            {
                return new CCSpawn(this);
            }
        }
开发者ID:eickegao,项目名称:cocos2d-xna,代码行数:27,代码来源:CCSpawn.cs


示例7: Send

 ///<summary>Pushes the data to the SecurityAssociation who will send it
 ///over the underlying edge.</summary>
 public override void Send(ICopyable data) {
   if(_closed == 1) {
     throw new EdgeClosedException("SecureEdge has been closed.");
   }
   try {
     SA.Send(data);
   } catch(Exception e) {
     throw new EdgeException(_closed == 1, "Unable to send on SE", e);
   }
 }
开发者ID:twchoi,项目名称:tmp-brunet-deetoo,代码行数:12,代码来源:SecureEdge.cs


示例8: CopyFrom

 public override void CopyFrom(ICopyable obj)
 {
     base.CopyFrom(obj);
     if (obj is IStatusCode)
     {
         IStatusCode sc = (IStatusCode)obj;
         Parts = new int[sc.Parts.Length];
         sc.Parts.CopyTo(Parts, 0);
     }
 }
开发者ID:SpivEgin,项目名称:ndef-nfc,代码行数:10,代码来源:StatusCode.cs


示例9: CopyFrom

 public override void CopyFrom(ICopyable obj)
 {
     base.CopyFrom(obj);
     if (obj is IGeographicLocation)
     {
         IGeographicLocation g = (IGeographicLocation)obj;
         Latitude = g.Latitude;
         Longitude = g.Longitude;
     }            
 }
开发者ID:logikonline,项目名称:DDay.iCal,代码行数:10,代码来源:GeographicLocation.cs


示例10: CopyFrom

        public override void CopyFrom(ICopyable obj)
        {
            base.CopyFrom(obj);

            IFreeBusyEntry fb = obj as IFreeBusyEntry;
            if (fb != null)
            {
                Status = fb.Status;
            }
        }
开发者ID:logikonline,项目名称:DDay.iCal,代码行数:10,代码来源:FreeBusyEntry.cs


示例11: CopyFrom

        public override void CopyFrom(ICopyable obj)
        {
            base.CopyFrom(obj);

            IOrganizer o = obj as IOrganizer;
            if (o != null)
            {
                Value = o.Value;
            }
        }
开发者ID:logikonline,项目名称:DDay.iCal,代码行数:10,代码来源:Organizer.cs


示例12: DataPacket

    public DataPacket(ICopyable packet) {
      _update_icpacket = false;
      _update_packet = false;

      _icpacket = packet;
      _packet = packet as MemBlock;
      if(_packet == null) {
        _update_packet = true;
      }
    }
开发者ID:kyungyonglee,项目名称:BrunetTutorial,代码行数:10,代码来源:DataPacket.cs


示例13: Send

 public void Send(ICopyable Data) {
   byte[] data = new byte[Data.Length];
   Data.CopyTo(data, 0);
   MemBlock mdata = MemBlock.Reference(data);
   for(int i = 0; i < _remove_n_ptypes; i++) {
     MemBlock payload = mdata;
     PType.Parse(mdata, out payload);
     mdata = payload;
   }
   Receiver.HandleData(mdata, ReturnPath, State);
 }
开发者ID:xujyan,项目名称:brunet,代码行数:11,代码来源:MockSender.cs


示例14: CopyFrom

        public override void CopyFrom(ICopyable c)
        {
            base.CopyFrom(c);

            ICalendarParameter p = c as ICalendarParameter;
            if (p != null)
            {
                if (p.Values != null)
                    _Values = new List<string>(p.Values);
            }
        }
开发者ID:SpivEgin,项目名称:ndef-nfc,代码行数:11,代码来源:CalendarParameter.cs


示例15: Copy

 public virtual object Copy(ICopyable zone)
 {
     if (zone != null)
     {
         ((CCAction) zone).m_nTag = m_nTag;
         return zone;
     }
     else
     {
         return new CCAction(this);
     }
 }
开发者ID:eickegao,项目名称:cocos2d-xna,代码行数:12,代码来源:CCAction.cs


示例16: CopyFrom

 public override void CopyFrom(ICopyable obj)
 {
     base.CopyFrom(obj);
     if (obj is IRequestStatus)
     {
         IRequestStatus rs = (IRequestStatus)obj;                
         if (rs.StatusCode != null)
             StatusCode = rs.StatusCode.Copy<IStatusCode>();
         Description = rs.Description;
         rs.ExtraData = rs.ExtraData;
     }
 }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:12,代码来源:RequestStatus.cs


示例17: CopyFrom

        public override void CopyFrom(ICopyable obj)
        {
            base.CopyFrom(obj);

            IPeriod p = obj as IPeriod;
            if (p != null)
            {
                StartTime = p.StartTime;
                EndTime = p.EndTime;
                Duration = p.Duration;
                MatchesDateOnly = p.MatchesDateOnly;
            }
        }
开发者ID:alexed1,项目名称:dtrack,代码行数:13,代码来源:Period.cs


示例18: Copy

 public override object Copy(ICopyable zone)
 {
     if (zone != null)
     {
         var ret = zone as CCScaleBy;
         base.Copy(zone); // Handles all data copying.
         return ret;
     }
     else
     {
         return new CCScaleBy(this);
     }
 }
开发者ID:CartBlanche,项目名称:cocos2d-xna,代码行数:13,代码来源:CCScaleBy.cs


示例19: Copy

 public override object Copy(ICopyable zone)
 {
     if (zone != null)
     {
         var ret = zone as CCReverseTime;
         base.Copy(zone);
         m_pOther = (CCFiniteTimeAction)ret.m_pOther; // .Copy() was in here before
         return ret;
     }
     else
     {
         return new CCReverseTime(this);
     }
 }
开发者ID:HarkDev,项目名称:cocos2d-xna,代码行数:14,代码来源:CCReverseTime.cs


示例20: CopyFrom

        public override void CopyFrom(ICopyable c)
        {
            base.CopyFrom(c);

            ICalendarParameter p = c as ICalendarParameter;
            if (p != null)
            {
                if (p.Values != null)
                {
                    Values = new string[p.Values.Length];
                    Array.Copy(p.Values, Values, p.Values.Length);
                }
            }
        }
开发者ID:MaitreDede,项目名称:dday-ical,代码行数:14,代码来源:CalendarParameter.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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