示例#1
0
        private async Task Load()
        {
            try
            {
                ShowLoading();
                Model ??= new DefaultTag();

                if (IsprivilegedMembersVisible)
                {
                    HashSet <string> members = new();
                    if (Model.privilegedMembers.IsNullOrEmptyExt())
                    {
                        var user = await GraphClientService.GetCurrentGraphUser();

                        if (user != null)
                        {
                            Model.privilegedMembers = user.AvailableUn;
                        }
                    }
                    if (Model.privilegedMembers.HasValueExt())
                    {
                        var spl = Model.privilegedMembers.Split(';');
                        foreach (var kv in spl)
                        {
                            if (kv.HasValueExt())
                            {
                                members.Add(kv);
                            }
                        }
                    }
                    Selectedmembers = members;
                }

                var tags = await SubcriptionService.GetDefualtTags(SubcriptionId);

                Tags = tags ?? new DefaultTags();
            }
            catch (Exception ex)
            {
                await CsroDialogService.ShowError("Error", $"Detail error: {ex.Message}");

                Logger.LogErrorCsro(ex);
            }
            finally
            {
                HideLoading();
            }
        }