Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete CustomSettingsService methods #15280

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,12 @@ public CustomSettingsService(
_settingsTypes = new Lazy<Task<IDictionary<string, ContentTypeDefinition>>>(async () => await GetContentTypeAsync());
}

[Obsolete($"Instead, utilize the {nameof(GetAllSettingsTypeNamesAsync)} method. This current method is slated for removal in upcoming releases.")]
public IEnumerable<string> GetAllSettingsTypeNames()
=> GetAllSettingsTypeNamesAsync().GetAwaiter().GetResult();

public async Task<IEnumerable<string>> GetAllSettingsTypeNamesAsync()
=> (await _settingsTypes.Value).Keys;


[Obsolete($"Instead, utilize the {nameof(GetAllSettingsTypesAsync)} method. This current method is slated for removal in upcoming releases.")]
public IEnumerable<ContentTypeDefinition> GetAllSettingsTypes()
=> GetAllSettingsTypesAsync().GetAwaiter().GetResult();

public async Task<IEnumerable<ContentTypeDefinition>> GetAllSettingsTypesAsync()
=> (await _settingsTypes.Value).Values;

[Obsolete($"Instead, utilize the {nameof(GetSettingsTypesAsync)} method. This current method is slated for removal in upcoming releases.")]
public IEnumerable<ContentTypeDefinition> GetSettingsTypes(params string[] settingsTypeNames)
=> GetSettingsTypesAsync(settingsTypeNames).GetAwaiter().GetResult();

public async Task<IEnumerable<ContentTypeDefinition>> GetSettingsTypesAsync(params string[] settingsTypeNames)
{
var types = await _settingsTypes.Value;
Expand Down
Loading