/// <summary> /// Query profiles of users who their owned names contains string "name" /// If "name" is an address it will return the profile for that address /// </summary> /// <param name="name">name or address</param> /// <param name="maxResults">max results for the query</param> /// <returns>Profiles or null (if no profile found) promise</returns> public Promise <UserProfileModel[]> SearchUser(string name, int maxResults) { searchPrommise?.Dispose(); searchPrommise = new Promise <UserProfileModel[]>(); currentSearchInput = name; WebInterface.SearchENSOwner(name, maxResults); return(searchPrommise); }
public void Dispose() { view.OnSearchText -= OnSearchText; view.OnShouldHide -= OnShouldHidePrompt; userViewsHandler.OnAddUser -= OnAddUserPressed; userViewsHandler.OnRemoveUser -= OnRemoveUserPressed; usersSearchPromise?.Dispose(); userViewsHandler.Dispose(); view.Dispose(); }
public void Given_a_disposed_Promise_Then_it_cannot_be_completed() { var promise = new Promise <int>(); promise.Dispose(); Assert.Throws <InvalidOperationException>(() => promise.Success(42)); }
public void Given_a_disposed_Promise_Then_it_cannot_be_failed() { var promise = new Promise <int>(); promise.Dispose(); Assert.Throws <InvalidOperationException>(() => promise.Failure(new Exception())); }
public void Dispose() { if (friendsController != null) { friendsController.OnUpdateFriendship -= OnUpdateFriendship; friendsController.OnInitialized -= OnFriendsInitialized; } friendListPromise?.Dispose(); friendListPromise = null; }
public void Dispose() { StopFetchInterval(); DataStore.i.HUDs.builderProjectsPanelVisible.OnChange -= OnVisibilityChanged; DataStore.i.dataStoreBuilderInWorld.unpublishSceneResult.OnChange -= OnSceneUnpublished; view.OnClosePressed -= OnClose; unpublishPopupController?.Dispose(); fetchLandPromise?.Dispose(); leftMenuSettingsViewHandler?.Dispose(); sectionsHandler?.Dispose(); sceneContextMenuHandler?.Dispose(); leftMenuHandler?.Dispose(); sectionsController?.Dispose(); scenesViewController?.Dispose(); view.Dispose(); }