Skip to content
Merged
Prev Previous commit
Next Next commit
Annotate ref
  • Loading branch information
maxkoshevoi committed Aug 14, 2021
commit 8a85d256a9bfc7b3e5114b3af8909b5a8e480dd3
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;

namespace Microsoft.Extensions.Configuration
{
public static partial class ConfigurationExtensions
{
public static Microsoft.Extensions.Configuration.IConfigurationBuilder Add<TSource>(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action<TSource> configureSource) where TSource : Microsoft.Extensions.Configuration.IConfigurationSource, new() { throw null; }
public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>> AsEnumerable(this Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; }
public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>> AsEnumerable(this Microsoft.Extensions.Configuration.IConfiguration configuration, bool makePathsRelative) { throw null; }
public static bool Exists(this Microsoft.Extensions.Configuration.IConfigurationSection section) { throw null; }
public static string GetConnectionString(this Microsoft.Extensions.Configuration.IConfiguration configuration, string name) { throw null; }
public static Microsoft.Extensions.Configuration.IConfigurationBuilder Add<TSource>(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action<TSource>? configureSource) where TSource : Microsoft.Extensions.Configuration.IConfigurationSource, new() { throw null; }
public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>> AsEnumerable(this Microsoft.Extensions.Configuration.IConfiguration configuration) { throw null; }
public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>> AsEnumerable(this Microsoft.Extensions.Configuration.IConfiguration configuration, bool makePathsRelative) { throw null; }
public static bool Exists([NotNullWhen(true)] this Microsoft.Extensions.Configuration.IConfigurationSection? section) { throw null; }
public static string? GetConnectionString(this Microsoft.Extensions.Configuration.IConfiguration configuration, string name) { throw null; }
public static Microsoft.Extensions.Configuration.IConfigurationSection GetRequiredSection(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Property)]
Expand All @@ -26,16 +28,17 @@ public static partial class ConfigurationPath
public static readonly string KeyDelimiter;
public static string Combine(System.Collections.Generic.IEnumerable<string> pathSegments) { throw null; }
public static string Combine(params string[] pathSegments) { throw null; }
public static string GetParentPath(string path) { throw null; }
public static string GetSectionKey(string path) { throw null; }
public static string? GetParentPath(string? path) { throw null; }
[return: NotNullIfNotNull("path")]
public static string? GetSectionKey(string? path) { throw null; }
}
public static partial class ConfigurationRootExtensions
{
public static string GetDebugView(this Microsoft.Extensions.Configuration.IConfigurationRoot root) { throw null; }
}
public partial interface IConfiguration
{
string this[string key] { get; set; }
string? this[string key] { get; set; }
System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationSection> GetChildren();
Microsoft.Extensions.Primitives.IChangeToken GetReloadToken();
Microsoft.Extensions.Configuration.IConfigurationSection GetSection(string key);
Expand All @@ -49,11 +52,11 @@ public partial interface IConfigurationBuilder
}
public partial interface IConfigurationProvider
{
System.Collections.Generic.IEnumerable<string> GetChildKeys(System.Collections.Generic.IEnumerable<string> earlierKeys, string parentPath);
System.Collections.Generic.IEnumerable<string> GetChildKeys(System.Collections.Generic.IEnumerable<string> earlierKeys, string? parentPath);
Microsoft.Extensions.Primitives.IChangeToken GetReloadToken();
void Load();
void Set(string key, string value);
bool TryGet(string key, out string value);
void Set(string key, string? value);
bool TryGet(string key, [MaybeNullWhen(false)] out string value);
}
public partial interface IConfigurationRoot : Microsoft.Extensions.Configuration.IConfiguration
{
Expand All @@ -64,7 +67,7 @@ public partial interface IConfigurationSection : Microsoft.Extensions.Configurat
{
string Key { get; }
string Path { get; }
string Value { get; set; }
string? Value { get; set; }
}
public partial interface IConfigurationSource
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="Microsoft.Extensions.Configuration.Abstractions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Primitives\ref\Microsoft.Extensions.Primitives.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Reference Include="System.Linq" />
<Reference Include="System.Runtime" />
<Reference Include="System.Collections" />
</ItemGroup>
</Project>