virtual protected void onClicked() { BasicEventArgs arg = new BasicEventArgs(); arg.objParam1 = gameObject; this.DispatchEvent(EventID.ID_EVENT_BUTTON_CLICK, arg); }
private async Task OnFlushed(object source, BasicEventArgs e) { if (Flushed == null) { return; } await Flushed.Invoke(source, e); }
private async Task OnLog(object source, BasicEventArgs e) { if (Log == null) { return; } await Log.Invoke(this, e); }
private async Task OnFailure(object source, BasicEventArgs e) { if (Failure == null) { return; } await Failure.Invoke(this, e); }
public static void Query(this SqliteConnection source, BasicEventArgs e) { source.Open(); using (SqliteTransaction transaction = source.BeginTransaction()) { using (SqliteCommand command = source.CreateCommand()) { command.Transaction = transaction; command.CommandText = e.Contents; command.ExecuteNonQuery(); } transaction.Commit(); } }
public static async Task QueryAsync(this SqliteConnection source, BasicEventArgs e) { await source.OpenAsync(); using (SqliteTransaction transaction = source.BeginTransaction()) { using (SqliteCommand command = source.CreateCommand()) { command.Transaction = transaction; command.CommandText = e.Contents; await command.ExecuteNonQueryAsync(); } transaction.Commit(); } }
public void DispatchEvent(string strEventID, BasicEventArgs e) { e.sender = this; EventHandler.DispatchEvent(strEventID, e); }
public void BasicEventArgsIdCanBeGetedAndIsSame(object id) { var actualInstance = new BasicEventArgs(id); Assert.AreEqual(actualInstance.Id, id); }
public void BasicEventArgsTestsCorectly_NewInstanceIsCreatedOfSameType() { var actualInstance = new BasicEventArgs(It.IsAny <string>()); Assert.IsInstanceOf(typeof(BasicEventArgs), actualInstance); }
public void BasicEventArgsTestsCorectly_NewInstanceIsCreated() { var actualInstance = new BasicEventArgs(It.IsAny <string>()); Assert.That(actualInstance, Is.Not.Null); }