public void Simple() { var listBase = new ListBase <int>(); listBase.AddRange(new [] { 3 }); Assert.IsTrue(listBase.Contains(3)); }
public MailMessage(string strFrom, string strTo, string strSubject, string strBody) : base() { From = strFrom; To = new ListBase <string>(); if ((strTo != null) && (strTo.Trim().Length > 0)) { To.AddRange(strTo.Split(new char[] { ';', ',' })); } Subject = strSubject; Body = strBody; IsBodyHtml = DefaultIsBodyHtml; DeliveryNotificationOptions = DefaultDeliveryNotificationOptions; }
public Task DiscoverBusDevices() { IEnumerable <IDiscoverDevices> dicoveryServices = GetDiscoveryServices(); var discoveryTask = Task.WhenAll(dicoveryServices.Select(x => x.GetConnectors())); return(discoveryTask.ContinueWith(t => { var devices = new ListBase <IBusDevice>(); if (!t.IsFaulted && !t.IsCanceled) { devices.AddRange(t.Result.SelectMany(x => x)); } this.BusDevices = new ListBase <IBusDevice>(devices.OfType <SPI.Device>()); })); }