Beispiel #1
0
 /// <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]);
     }
 }
Beispiel #2
0
 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());
 }
Beispiel #3
0
 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();
        }
Beispiel #5
0
 /// <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);
         }
     }
 }
Beispiel #6
0
 /// <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);
         }
     }
 }
Beispiel #7
0
        private static void RemoveInCollection(
            IRemove addRemoveCollection,
            int count)
        {
            for (int i = 0; i < count; i++)
            {
                Console.Write(
                    $"{addRemoveCollection.RemoveElement()} ");
            }

            Console.WriteLine();
        }
Beispiel #8
0
        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);
        }
Beispiel #9
0
 public MvxDeleteSimpleTableViewSource(IRemove viewModel, UITableView tableView, string nibName, string cellIdentifier = null, NSBundle bundle = null)
     : base(tableView, nibName, cellIdentifier, bundle)
 {
     m_ViewModel = viewModel;
 }
Beispiel #10
0
 /// <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);
Beispiel #11
0
 /// <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);
Beispiel #12
0
 /// <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());
Beispiel #13
0
 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;
 }
 public MvxDeleteSimpleTableViewSource(IRemove viewModel, UITableView tableView, Type cellType, string cellIdentifier = null)
     : base(tableView, cellType, cellIdentifier)
 {
     m_ViewModel = viewModel;
 }
Beispiel #16
0
 /// <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());
Beispiel #17
0
 public MvxDeleteSimpleTableViewSource(IRemove viewModel, IntPtr intptr)
     : base(intptr)
 {
     m_ViewModel = viewModel;
 }
Beispiel #18
0
 /// <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;
 }
Beispiel #23
0
 public EditTableViewSource(IRemove viewModel, UITableView tableView) : base(tableView)
 {
     _mainViewModel = viewModel;
     tableView.RegisterClassForCellReuse(typeof(Cell), new NSString("Cell"));
 }
Beispiel #24
0
 private Message PerformMapping(IRemove source)
 {
     return Mapping.Map<IRemove, Remove>(source);
 }
 public MvxDeleteSimpleTableViewSource(IRemove viewModel, IntPtr intptr)
     : base(intptr)
 {
     m_ViewModel = viewModel;
 }
 public MvxDeleteSimpleTableViewSource(IRemove viewModel, UITableView tableView, string nibName, string cellIdentifier = null, NSBundle bundle = null)
     : base(tableView, nibName, cellIdentifier, bundle)
 {
     m_ViewModel = viewModel;
 }
Beispiel #27
0
 private Message PerformMapping(IRemove source)
 {
     return(Mapping.Map <IRemove, Remove>(source));
 }
Beispiel #28
0
 public EditTableViewSource(IRemove viewModel, UITableView tableView, string bindingText) : base(tableView, bindingText)
 {
     _mainViewModel = viewModel;
 }