Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 78c1f04

Browse files
committed
Deprecate and rename ReferenceAssembyPath to ReferenceAssemblyPath
1 parent 213f7b8 commit 78c1f04

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/ServiceStack.Text/Env.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,26 @@ public static DateTime GetReleaseDate()
148148
return __releaseDate;
149149
}
150150

151-
private static string referenceAssembyPath;
152-
public static string ReferenceAssembyPath
151+
[Obsolete("Use ReferenceAssemblyPath")]
152+
public static string ReferenceAssembyPath => ReferenceAssemblyPath;
153+
154+
private static string referenceAssemblyPath;
155+
public static string ReferenceAssemblyPath
153156
{
154157
get
155158
{
156-
if (!IsMono && referenceAssembyPath == null)
159+
if (!IsMono && referenceAssemblyPath == null)
157160
{
158161
var programFilesPath = PclExport.Instance.GetEnvironmentVariable("ProgramFiles(x86)") ?? @"C:\Program Files (x86)";
159162
var netFxReferenceBasePath = programFilesPath + @"\Reference Assemblies\Microsoft\Framework\.NETFramework\";
160163
if ((netFxReferenceBasePath + @"v4.5.2\").DirectoryExists())
161-
referenceAssembyPath = netFxReferenceBasePath + @"v4.5.2\";
164+
referenceAssemblyPath = netFxReferenceBasePath + @"v4.5.2\";
162165
else if ((netFxReferenceBasePath + @"v4.5.1\").DirectoryExists())
163-
referenceAssembyPath = netFxReferenceBasePath + @"v4.5.1\";
166+
referenceAssemblyPath = netFxReferenceBasePath + @"v4.5.1\";
164167
else if ((netFxReferenceBasePath + @"v4.5\").DirectoryExists())
165-
referenceAssembyPath = netFxReferenceBasePath + @"v4.5\";
168+
referenceAssemblyPath = netFxReferenceBasePath + @"v4.5\";
166169
else if ((netFxReferenceBasePath + @"v4.0\").DirectoryExists())
167-
referenceAssembyPath = netFxReferenceBasePath + @"v4.0\";
170+
referenceAssemblyPath = netFxReferenceBasePath + @"v4.0\";
168171
else
169172
{
170173
var v4Dirs = PclExport.Instance.GetDirectoryNames(netFxReferenceBasePath, "v4*");
@@ -176,7 +179,7 @@ public static string ReferenceAssembyPath
176179
}
177180
if (v4Dirs.Length > 0)
178181
{
179-
referenceAssembyPath = v4Dirs[v4Dirs.Length - 1] + @"\"; //latest v4
182+
referenceAssemblyPath = v4Dirs[v4Dirs.Length - 1] + @"\"; //latest v4
180183
}
181184
else
182185
{
@@ -186,9 +189,9 @@ public static string ReferenceAssembyPath
186189
}
187190
}
188191
}
189-
return referenceAssembyPath;
192+
return referenceAssemblyPath;
190193
}
191-
set => referenceAssembyPath = value;
194+
set => referenceAssemblyPath = value;
192195
}
193196

194197
#if NETSTANDARD2_0

0 commit comments

Comments
 (0)