/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast <TElement>(this IRemove <TElement> collection, ReadOnlySpan <TElement> elements) { for (Int32 i = 0; i < elements.Length; i++) { collection.RemoveLast(elements[i]); } }
public ToolDemo(ICommandManager commandManager, IKeyboard keyboard, IConfig <Config> config) { token = commandManager.Add(keyboard.Down(Caps + A), e => { Logger.LogInformation($"{nameof(ToolDemo)}: Caps+A triggered!!!!!!!"); }); Logger.LogInformation(config.CurrentValue.Option1); Logger.LogInformation(config.CurrentValue.Option2.ToString()); }
public static unsafe void RemoveLast <TElement>(this IRemove <TElement> collection, TElement *elements, Int32 length) where TElement : unmanaged { for (Int32 i = 0; i < length; i++) { collection.RemoveLast(elements[i]); } }
public static void RemoveItems(IRemove removeCollection, int n) { for (int i = 0; i < n; i++) { Console.Write(removeCollection.Remove() + " "); } Console.WriteLine(); }
/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast <TElement>(this IRemove <TElement> collection, Collections.Generic.IEnumerable <TElement>?elements) { if (elements is not null) { foreach (TElement element in elements) { collection.RemoveLast(element); } } }
/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <typeparam name="TEnumerator">The type of the enumerator of the <paramref name="elements"/>.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast <TElement, TEnumerator>(this IRemove <TElement> collection, IGetEnumerator <TElement, TEnumerator>?elements) where TEnumerator : notnull, ICurrent <TElement>, IMoveNext { if (elements is not null) { foreach (TElement element in elements) { collection.RemoveLast(element); } } }
private static void RemoveInCollection( IRemove addRemoveCollection, int count) { for (int i = 0; i < count; i++) { Console.Write( $"{addRemoveCollection.RemoveElement()} "); } Console.WriteLine(); }
public CrudOperations(SqlConnection db) { //Better if provided via a DI Container _db = db; //Better if provided via a DI Container var selectCommand = new SelectCommand <T>(); _selectOperations = new SelectOperations <T>(db, selectCommand); //Better if provided via a DI Container var insertCommand = new InsertCommand <T>(); //Better if provided via a DI Container var insertInside = new InsertInside(_db); _insertOperations = new InsertOperation <T>(db, insertCommand, insertInside); //Better if provided via a DI Container var removeCommand = new RemoveCommand <T>(); _removeOperations = new RemoveOperations <T>(db, removeCommand); }
public MvxDeleteSimpleTableViewSource(IRemove viewModel, UITableView tableView, string nibName, string cellIdentifier = null, NSBundle bundle = null) : base(tableView, nibName, cellIdentifier, bundle) { m_ViewModel = viewModel; }
/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast <TElement>(this IRemove <TElement> collection, Span <TElement> elements) => RemoveLast(collection, (ReadOnlySpan <TElement>)elements);
/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast <TElement>(this IRemove <TElement> collection, ReadOnlyMemory <TElement> elements) => RemoveLast(collection, elements.Span);
/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast <TElement>(this IRemove <TElement> collection, params TElement[]?elements) => RemoveLast(collection, elements.AsSpan());
public MvxDeleteSimpleTableViewSource(IRemove viewModel, UITableView tableView, Type cellType, string cellIdentifier = null) : base(tableView, cellType, cellIdentifier) { m_ViewModel = viewModel; }
public MvxDeleteStandardTableViewSource(IRemove viewModel, UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, IEnumerable <MvxBindingDescription> descriptions, UITableViewCellAccessory tableViewCellAccessory = 0) : base(tableView, style, cellIdentifier, descriptions, tableViewCellAccessory) { m_ViewModel = viewModel; }
/// <summary> /// Removes the last instance of the elements from this object. /// </summary> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveLast(this IRemove <Char> collection, String?elements) => RemoveLast(collection, elements.AsSpan());
public MvxDeleteSimpleTableViewSource(IRemove viewModel, IntPtr intptr) : base(intptr) { m_ViewModel = viewModel; }
/// <summary> /// Removes the first instance of the elements from this object. /// </summary> /// <typeparam name="TElement">The type of the elements in the collection.</typeparam> /// <param name="collection">This collection.</param> /// <param name="elements">The elements to remove.</param> public static void RemoveFirst <TElement>(this IRemove <TElement> collection, Memory <TElement> elements) => RemoveFirst(collection, elements.Span);
public MvxDeleteStandardTableViewSource(IRemove viewModel, UITableView tableView, UITableViewCellStyle style, NSString cellId, string binding, UITableViewCellAccessory accessory) : base(tableView, style, cellId, binding, accessory) { m_ViewModel = viewModel; }
public MvxDeleteStandardTableViewSource(IRemove viewModel, UITableView tableView) : base(tableView) { m_ViewModel = viewModel; }
public MvxDeleteStandardTableViewSource(IRemove viewModel, UITableView tableView, NSString cellIdentifier) : base(tableView, cellIdentifier) { m_ViewModel = viewModel; }
public MvxDeleteStandardTableViewSource(IRemove viewModel, UITableView tableView, string bindingText) : base(tableView, bindingText) { m_ViewModel = viewModel; }
public EditTableViewSource(IRemove viewModel, UITableView tableView) : base(tableView) { _mainViewModel = viewModel; tableView.RegisterClassForCellReuse(typeof(Cell), new NSString("Cell")); }
private Message PerformMapping(IRemove source) { return Mapping.Map<IRemove, Remove>(source); }
private Message PerformMapping(IRemove source) { return(Mapping.Map <IRemove, Remove>(source)); }
public EditTableViewSource(IRemove viewModel, UITableView tableView, string bindingText) : base(tableView, bindingText) { _mainViewModel = viewModel; }