Esempio n. 1
0
        /// <summary>
        /// Parse Library and convert parsed data into structure
        /// </summary>
        /// <param name="library">Name of Library</param>
        private void Parse(string library)
        {
            string[] libraryInformation         = library.Split(new char[] { ' ' }, 3);
            CloneLibraryInformation information = new CloneLibraryInformation()
            {
                LibraryName               = libraryInformation[0],
                MeanLengthOfInsert        = float.Parse(libraryInformation[1], CultureInfo.InvariantCulture),
                StandardDeviationOfInsert = float.Parse(libraryInformation[2], CultureInfo.InvariantCulture)
            };

            _libraries.Add(information.LibraryName, information);
        }
Esempio n. 2
0
 /// <summary>
 /// Add Library to existing list of libraries.
 /// </summary>
 /// <param name="library">Libarary information.</param>
 public void AddLibrary(CloneLibraryInformation library)
 {
     if (null != library && !String.IsNullOrEmpty(library.LibraryName) &&
         library.MeanLengthOfInsert >= 0 && library.StandardDeviationOfInsert >= 0)
     {
         _libraries[library.LibraryName] = library;
     }
     else
     {
         throw new ArgumentException(Resource.LibraryInvalidParameters);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Add Library to existing list of libraries.
        /// </summary>
        /// <param name="libraryName">Name of Library.</param>
        /// <param name="mean">Mean Length Of Insert.</param>
        /// <param name="standardDeviation">Standard Deviation Of Insert.</param>
        public void AddLibrary(string libraryName, float mean, float standardDeviation)
        {
            if (String.IsNullOrEmpty(libraryName) || mean < 0 || standardDeviation < 0)
            {
                throw new ArgumentException(Resource.LibraryInvalidParameters);
            }

            CloneLibraryInformation library = new CloneLibraryInformation()
            {
                LibraryName               = libraryName,
                MeanLengthOfInsert        = mean,
                StandardDeviationOfInsert = standardDeviation
            };

            _libraries[libraryName] = library;
        }