Activities of "alper"

Answer

hi,

you can see Event Bus system. By Event Bus, you can register to your card insert event and the subscriber class can send the data to the client via SignalR.

and I can share a sample code to init SignalR connection in the Angular side

import * as signalR from '@microsoft/signalr';

 private initSignalR(currentUser: ApplicationConfiguration.CurrentUser) {
    if (this.conectedUserId === currentUser.id) return;
    if (this.connection) this.connection.stop();

    this.connection = new signalR.HubConnectionBuilder()
      .withUrl(`${this.signalRUrl}/signalr-hubs/chat`, {
        accessTokenFactory: () => this.oAuthService.getAccessToken(),
      })
      .build();

    this.connection.on('ReceiveMessage', this.handleMessage);

    this.connection
      .start()
      .then(() => {
        this.conectedUserId = currentUser.id;
      })
      .catch((err) => {
        return console.error(err.toString());
      });
  }

Also see the usage from https://www.npmjs.com/package/@microsoft/signalr

Check out https://docs.abp.io/en/abp/latest/Object-Extensions In this document an extra field SocialSecurityNumber is being added to IdentityUser entity.

Hi,

Use the below service to fetch the texts, Now you can fetch without any permission.


 public class MyLanguageAppService : LanguageAppServiceBase, IApplicationService
    {
        protected ILanguageTextRepository LanguageTextRepository { get; }
        protected IStringLocalizerFactory LocalizerFactory { get; }
        protected AbpLocalizationOptions AbpLocalizationOptions { get; }

        public MyLanguageAppService(
            ILanguageTextRepository languageTextRepository,
            IOptions<AbpLocalizationOptions> abpLocalizationOptions,
            IStringLocalizerFactory localizerFactory)
        {
            LanguageTextRepository = languageTextRepository;
            LocalizerFactory = localizerFactory;
            AbpLocalizationOptions = abpLocalizationOptions.Value;
        }

        public Task<PagedResultDto<LanguageTextDto>> GetListAsync(GetLanguagesTextsInput input)
        {
            var languageTexts = new List<LanguageTextDto>();

            foreach (var resourceName in GetResourceNames(input))
            {
                languageTexts.AddRange(GetLocalizationsFromResource(input, resourceName));
            }

            var filteredQuery = languageTexts
                .AsQueryable()
                .WhereIf(
                    !input.Filter.IsNullOrWhiteSpace(),
                    l =>
                        (l.Name != null && l.Name.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0) ||
                        (l.BaseValue != null && l.BaseValue.IndexOf(input.Filter, StringComparison.OrdinalIgnoreCase) >= 0) ||
                        (!input.GetOnlyEmptyValues && l.Value != null && l.Value.IndexOf(input.Filter, StringComparison.InvariantCultureIgnoreCase) >= 0)
                );

            var languagesTextDtos = filteredQuery
                .OrderBy(input.Sorting ?? $"{nameof(LanguageTextDto.Name)} ASC")
                .PageBy(input)
                .ToList();

            return Task.FromResult(new PagedResultDto<LanguageTextDto>(
                filteredQuery.Count(),
                languagesTextDtos
            ));
        }

        protected List<string> GetResourceNames(GetLanguagesTextsInput input)
        {
            var resourceNames = new List<string>();

            if (string.IsNullOrWhiteSpace(input.ResourceName))
            {
                resourceNames.AddRange(
                    AbpLocalizationOptions
                        .Resources
                        .Values
                        .Select(l => l.ResourceName)
                );
            }
            else
            {
                resourceNames.Add(input.ResourceName);
            }

            return resourceNames;
        }

        protected virtual List<LanguageTextDto> GetLocalizationsFromResource(
          GetLanguagesTextsInput input,
          string resourceName)
        {
            var localizer = GetLocalizer(resourceName);

            List<LocalizedString> baseLocalizedStrings;
            List<LocalizedString> targetLocalizedStrings;

            using (CultureHelper.Use(CultureInfo.GetCultureInfo(input.BaseCultureName)))
            {
                baseLocalizedStrings = localizer
                    .GetAllStrings(includeParentCultures: true, includeBaseLocalizers: false)
                    .ToList();
            }

            using (CultureHelper.Use(CultureInfo.GetCultureInfo(input.TargetCultureName)))
            {
                targetLocalizedStrings = localizer
                    .GetAllStrings(includeParentCultures: false, includeBaseLocalizers: false)
                    .ToList();
            }

            var languageTextDtos = new List<LanguageTextDto>();

            foreach (var baseLocalizedString in baseLocalizedStrings)
            {
                var target = targetLocalizedStrings.FirstOrDefault(l => l.Name == baseLocalizedString.Name);

                if (input.GetOnlyEmptyValues)
                {
                    if (!string.IsNullOrEmpty(target?.Value))
                    {
                        continue;
                    }
                }

                languageTextDtos.Add(
                    new LanguageTextDto
                    {
                        BaseCultureName = input.BaseCultureName,
                        CultureName = input.TargetCultureName,
                        Name = baseLocalizedString.Name,
                        BaseValue = baseLocalizedString.Value,
                        ResourceName = resourceName,
                        Value = target?.Value ?? ""
                    }
                );
            }

            return languageTextDtos;
        }

        protected IStringLocalizer GetLocalizer(LocalizationResource resource)
        {
            return LocalizerFactory.Create(resource.ResourceType);
        }

        protected IStringLocalizer GetLocalizer(string recourseName)
        {
            return GetLocalizer(GetLocalizationResource(recourseName));
        }

        protected LocalizationResource GetLocalizationResource(string resourceName)
        {
            var resource = AbpLocalizationOptions.Resources
                .Values
                .FirstOrDefault(r => r.ResourceName == resourceName);

            if (resource == null)
            {
                throw new AbpException($"Resource not found: {resourceName}");
            }

            return resource;
        }
    }

Answer

@pvaz can you share the GitHub link of the comment that solves in RC-4.1

good! so update it to 3.3.2 I'm closing the issue. reopen if it continues... happy coding.

good to hear that. closing the issue

robb@designitcorp.ca it doesn't matter where the solution is located. the entites must be inside the root folder of the solution (in .suite/entities folder)

can you send us the project? info@abp.io

Answer

@pvaz if you upgraded from 3X to 4X see this post https://docs.abp.io/en/abp/4.0/Migration-Guides/Abp-4_0 also check out https://github.com/abpframework/abp/issues/5950#issue-729718680

robb@designitcorp.ca check out https://support.abp.io/QA/Questions/625/How-to-include-Suite-entities-in-my-source-control-system#answer-1287c0f9-c787-9953-f091-39f9374847bc

Showing 1341 to 1350 of 1868 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11