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


C# ISequence.ToArray方法代码示例

本文整理汇总了C#中ISequence.ToArray方法的典型用法代码示例。如果您正苦于以下问题:C# ISequence.ToArray方法的具体用法?C# ISequence.ToArray怎么用?C# ISequence.ToArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISequence的用法示例。


在下文中一共展示了ISequence.ToArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Sequence

        /// <summary>
        /// Initializes a new instance of the Sequence class with passed new Sequence. Creates a copy of the sequence.
        /// </summary>
        /// <param name="newSequence">The New sequence for which the copy has to be made.</param>
        public Sequence(ISequence newSequence)
        {
            if (newSequence == null)
            {
                throw new ArgumentNullException("newSequence");
            }

            this.ID = newSequence.ID;
            this.Alphabet = newSequence.Alphabet;
            this.Count = newSequence.Count;
            this._metadata = new Dictionary<string, object>(newSequence.Metadata);

            Sequence realSequence = newSequence as Sequence;
            if (realSequence != null)
            {
                this._sequenceData = new byte[newSequence.Count];
                Helper.Copy(realSequence._sequenceData, this._sequenceData, realSequence._sequenceData.GetLongLength());
            }
            else
            {
                this._sequenceData = newSequence.ToArray();
            }
        }
开发者ID:cpatmoore,项目名称:bio,代码行数:27,代码来源:Sequence.cs

示例2: FixedSequenceGroup

 /// <summary> </summary>
 /// <param name="sequences">sequences the list of sequences to be tracked under this sequence group</param>
 public FixedSequenceGroup(ISequence[] sequences)
 {
     _sequences = sequences.ToArray();
 }
开发者ID:disruptor-net,项目名称:Disruptor-net,代码行数:6,代码来源:FixedSequenceGroup.cs

示例3: GetByteArrayFromSequence

 /// <summary>
 /// Retrieve or copy the sequence array
 /// </summary>
 /// <param name="sequence"></param>
 /// <returns></returns>
 private static byte[] GetByteArrayFromSequence(ISequence sequence)
 {
     var realSequence = sequence as Sequence;
     return realSequence != null 
         // Very fast grab internal array
         ? realSequence.GetInternalArray()
         // Much slower copy
         : sequence.ToArray();
 }
开发者ID:cpatmoore,项目名称:bio,代码行数:14,代码来源:PairwiseSequenceAligner.cs


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