public ActionResult <Appending> Appenda(string appendable) { if (string.IsNullOrWhiteSpace(appendable)) { var result = BadRequest(404); Log log = new Log() { CreatedAt = DateTime.Now, Data = result.ToString(), Endpoint = "/appenda/{appendable}" }; return(result); } else { var result = new Appending() { Appenda = appendable }; Log log = new Log() { CreatedAt = DateTime.Now, Data = $"Appenda: {result.Appenda}", Endpoint = "/appenda/{appendable}" }; return(result); } }
public void Appending_Initialization_01() { ObservableCollection <Item> items = new ObservableCollection <Item>(); Appending <Item> appending = items.Appending(new Item()); appending.ValidateConsistency(); }
public void Appending_Initialization_01() { ObservableCollection <Item> items = new ObservableCollection <Item>(); Appending <Item> appending = items.Appending(new Item()).For(consumer); appending.ValidateInternalConsistency(); consumer.Dispose(); }
public void Appending_Insert1() { ObservableCollection <Item> items = new ObservableCollection <Item>(); Appending <Item> appending = items.Appending(new Item()); appending.ValidateConsistency(); items.Insert(0, new Item()); appending.ValidateConsistency(); }
public void Appending_Insert1() { ObservableCollection <Item> items = new ObservableCollection <Item>(); Appending <Item> appending = items.Appending(new Item()).IsNeededFor(consumer); appending.ValidateConsistency(); items.Insert(0, new Item()); appending.ValidateConsistency(); consumer.Dispose(); }
public static void Main(string[] args) { Console.WriteLine("{0}", _Add <double>(3, 4)); Console.WriteLine("{0}", _Sub <double, int>(3.3, 4)); //////////////////////////////// Appending <double> appending = new Appending <double>(); appending._Append(10); appending._Append(20); appending._Append(30); appending._Append(40); appending._Print(); }
public void Appending_Remove1() { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item() } ); Appending <Item> appending = items.Appending(new Item()); appending.ValidateConsistency(); items.RemoveAt(0); appending.ValidateConsistency(); }
public void Appending_Remove1() { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item() } ); Appending <Item> appending = items.Appending(new Item()).For(consumer); appending.ValidateInternalConsistency(); items.RemoveAt(0); appending.ValidateInternalConsistency(); consumer.Dispose(); }
public void Appending_Remove( [Range(0, 4, 1)] int index) { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(), new Item(), new Item(), new Item(), new Item() } ); Appending <Item> appending = items.Appending(new Item()); appending.ValidateConsistency(); items.RemoveAt(index); appending.ValidateConsistency(); }
public void Appending_Set( [Range(0, 4, 1)] int index) { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(), new Item(), new Item(), new Item(), new Item() } ); Appending <Item> appending = items.Appending(new Item()).For(consumer); appending.ValidateInternalConsistency(); items[index] = new Item(); appending.ValidateInternalConsistency(); consumer.Dispose(); }
public void Appending_Insert( [Range(0, 4, 1)] int index) { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(), new Item(), new Item(), new Item(), new Item() } ); Appending <Item> appending = items.Appending(new Item()).IsNeededFor(consumer); appending.ValidateConsistency(); items.Insert(index, new Item()); appending.ValidateConsistency(); consumer.Dispose(); }
public void AppendText(string text, Color color, bool bold) //Empty for use theme color { if (appendings.Count(_ => _.Text == text && _.Color == color && _.Bold == bold) == 0) { appendings.Add(Appending.Create(text, color, bold)); } baseTextBox.SelectionStart = baseTextBox.TextLength; baseTextBox.SelectionLength = 0; if (bold) { baseTextBox.SelectionFont = new Font(baseTextBox.Font, FontStyle.Bold); } else { baseTextBox.SelectionFont = new Font(baseTextBox.Font, FontStyle.Regular); } baseTextBox.SelectionColor = color == Color.Empty ? MetroPaint.ForeColor.Label.Normal(Theme) : color; baseTextBox.AppendText(text); baseTextBox.SelectionColor = baseTextBox.ForeColor; }
public void Appending_Move( [Range(0, 4, 1)] int oldIndex, [Range(0, 4, 1)] int newIndex) { ObservableCollection <Item> items = new ObservableCollection <Item>( new[] { new Item(), new Item(), new Item(), new Item(), new Item() } ); Appending <Item> appending = items.Appending(new Item()).For(consumer); appending.ValidateConsistency(); items.Move(oldIndex, newIndex); appending.ValidateConsistency(); consumer.Dispose(); }