blob: 6d28d393b21c47673dc1c9c1f3d7ad50385dcde4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Internal.Runtime.Augments
{
/// <summary>For internal use only. Exposes runtime functionality to the Environments implementation in corefx.</summary>
public static partial class EnvironmentAugments
{
private static string GetEnvironmentVariableCore(string variable)
{
Debug.Assert(variable != null);
return Marshal.PtrToStringAnsi(Interop.Sys.GetEnv(variable));
}
private static void SetEnvironmentVariableCore(string variable, string value)
{
Debug.Assert(variable != null);
throw new NotImplementedException();
}
public static IEnumerable<KeyValuePair<string,string>> EnumerateEnvironmentVariables()
{
if ("".Length != 0)
throw new NotImplementedException(); // Need to return something better than an empty environment block.
return Array.Empty<KeyValuePair<string,string>>();
}
private static void ExitRaw()
{
Interop.Sys.Exit(s_latchedExitCode);
}
}
}
|