Пример #1
0
 /// <summary>
 /// Add a Uuid with a description to use later
 /// </summary>
 /// <param name="id">The Uuid that will be accessable through the description</param>
 /// <param name="description">The description that will can be accessable through the Uuid</param>
 /// <param name="type">Optional type for either a log or a file</param>
 public static void Add(string id, string description, UuidObject.UuidType type)
 {
     if (DBUuids.Where(u => { if (u.Id == id || u.Description == description)
                              {
                                  return(true);
                              }
                              else
                              {
                                  return(false);
                              } }).Count() == 0)
     {
         DBUuids.Add(new UuidObject()
         {
             Description = description, Id = id, Type = type
         });
     }
 }
Пример #2
0
        /// <summary>
        /// Return All UuidObjects in the UuidObject list. A type can be specified to narrow down the output.
        /// </summary>
        /// <param name="type">The type of UuidObject you want to return</param>
        /// <returns>All UuidObjects in the list with a specified type</returns>
        public static List <UuidObject> LookAll(UuidObject.UuidType type = UuidObject.UuidType.All)
        {
            var x = DBUuids.Where(u => { if (u.Type == type | type == UuidObject.UuidType.All)
                                         {
                                             return(true);
                                         }
                                         else
                                         {
                                             return(false);
                                         } }).ToList();

            if (x.Count != 0)
            {
                return(x);
            }
            else
            {
                return(null);
            }
        }