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


C# ICopyable类代码示例

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


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


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