Ejemplo n.º 1
0
        public async Task Create(Profile profile)
        {
            if (profile == null)
            {
                return;
            }

            await _storage.Create(profile);
        }
Ejemplo n.º 2
0
        public async Task Create(Profile profile)
        {
            // Toggle profile on QuickConnectViewModel is not checking for profile name duplicates.
            // Ensure new profile name shown to the user is initially adjusted for uniqueness.
            var p = _syncProfile.WithUniqueName(profile);

            await _profiles.Create(p);

            Sync();
        }
Ejemplo n.º 3
0
        private async Task <Profile> CreatedInApi(Profile profile)
        {
            if (profile == null)
            {
                return(null);
            }

            try
            {
                await _apiProfiles.Create(profile);

                _cancellationToken.ThrowIfCancellationRequested();
            }
            catch (ProfileException ex)
            {
                await HandleException(ex, profile);

                return(null);
            }

            return(profile);
        }
Ejemplo n.º 4
0
 public Task AddProfile(Profile profile)
 {
     AddCountryCode(profile);
     return(_profiles.Create(profile));
 }