Exemple #1
0
 /// <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);
 }
Exemple #2
0
    public void Dispose()
    {
        view.OnSearchText             -= OnSearchText;
        view.OnShouldHide             -= OnShouldHidePrompt;
        userViewsHandler.OnAddUser    -= OnAddUserPressed;
        userViewsHandler.OnRemoveUser -= OnRemoveUserPressed;

        usersSearchPromise?.Dispose();
        userViewsHandler.Dispose();
        view.Dispose();
    }
Exemple #3
0
        public void Given_a_disposed_Promise_Then_it_cannot_be_completed()
        {
            var promise = new Promise <int>();

            promise.Dispose();
            Assert.Throws <InvalidOperationException>(() => promise.Success(42));
        }
Exemple #4
0
        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;
    }
Exemple #6
0
    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();
    }