You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,71 @@
|
||||
//---------------------------------------------------------------------
|
||||
// <copyright file="ObjectContext.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// @owner daobando
|
||||
// @backupOwner [....]
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration;
|
||||
|
||||
namespace System.Data.Entity.Util
|
||||
{
|
||||
internal static class AppSettings
|
||||
{
|
||||
private static volatile bool _settingsInitialized = false;
|
||||
private static object _appSettingsLock = new object();
|
||||
private static void EnsureSettingsLoaded()
|
||||
{
|
||||
if (!_settingsInitialized)
|
||||
{
|
||||
lock (_appSettingsLock)
|
||||
{
|
||||
if (!_settingsInitialized)
|
||||
{
|
||||
NameValueCollection settings = null;
|
||||
try
|
||||
{
|
||||
settings = ConfigurationManager.AppSettings;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (settings == null || !Boolean.TryParse(settings["EntityFramework_SimplifyLimitOperations"], out _SimplifyLimitOperations))
|
||||
{
|
||||
_SimplifyLimitOperations = false;
|
||||
}
|
||||
|
||||
if (settings == null || !Boolean.TryParse(settings["EntityFramework_SimplifyUserSpecifiedViews"], out _SimplifyUserSpecifiedViews))
|
||||
{
|
||||
_SimplifyUserSpecifiedViews = true;
|
||||
}
|
||||
|
||||
_settingsInitialized = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool _SimplifyLimitOperations = false;
|
||||
internal static bool SimplifyLimitOperations
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureSettingsLoaded();
|
||||
return _SimplifyLimitOperations;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool _SimplifyUserSpecifiedViews = true;
|
||||
internal static bool SimplifyUserSpecifiedViews
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureSettingsLoaded();
|
||||
return _SimplifyUserSpecifiedViews;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user