You've already forked linux-packaging-mono
Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
parent
1190d13a04
commit
6bdd276d05
@@ -31,7 +31,9 @@ namespace System.CodeDom {
|
||||
private CodeNamespaceImportCollection imports = new CodeNamespaceImportCollection();
|
||||
private CodeCommentStatementCollection comments = new CodeCommentStatementCollection();
|
||||
private CodeTypeDeclarationCollection classes = new CodeTypeDeclarationCollection();
|
||||
#if CODEDOM_NESTED_NAMESPACES
|
||||
private CodeNamespaceCollection namespaces = new CodeNamespaceCollection();
|
||||
#endif
|
||||
|
||||
private int populated = 0x0;
|
||||
private const int ImportsCollection = 0x1;
|
||||
|
@@ -27,7 +27,9 @@ namespace System.CodeDom {
|
||||
public class CodePropertyReferenceExpression : CodeExpression {
|
||||
private CodeExpression targetObject;
|
||||
private string propertyName;
|
||||
#if !MONO
|
||||
private CodeExpressionCollection parameters = new CodeExpressionCollection();
|
||||
#endif
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
|
@@ -380,7 +380,7 @@ namespace System.ComponentModel {
|
||||
else {
|
||||
args = new Type[] {receiverType};
|
||||
}
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
IntSecurity.FullReflection.Assert();
|
||||
#endif
|
||||
try {
|
||||
@@ -456,7 +456,7 @@ namespace System.ComponentModel {
|
||||
else {
|
||||
args = new Type[] {receiverType};
|
||||
}
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
IntSecurity.FullReflection.Assert();
|
||||
#endif
|
||||
try {
|
||||
|
@@ -1 +1 @@
|
||||
ad04d77a51370aba0e61ef13802c5ec1bef78583
|
||||
a795ad2d8fa52998de3ca0e81480c62c2a43e422
|
@@ -11,13 +11,13 @@ namespace System.ComponentModel {
|
||||
|
||||
[HostProtection(SharedState = true)]
|
||||
internal static class IntSecurity {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
public static readonly CodeAccessPermission UnmanagedCode = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
|
||||
public static readonly CodeAccessPermission FullReflection = new ReflectionPermission(PermissionState.Unrestricted);
|
||||
#endif
|
||||
|
||||
public static string UnsafeGetFullPath(string fileName) {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
string full = fileName;
|
||||
|
||||
FileIOPermission fiop = new FileIOPermission(PermissionState.None);
|
||||
|
@@ -98,11 +98,15 @@ namespace System.ComponentModel {
|
||||
}
|
||||
|
||||
private class LicFileLicense : License {
|
||||
#if !MONO
|
||||
private LicFileLicenseProvider owner;
|
||||
#endif
|
||||
private string key;
|
||||
|
||||
public LicFileLicense(LicFileLicenseProvider owner, string key) {
|
||||
#if !MONO
|
||||
this.owner = owner;
|
||||
#endif
|
||||
this.key = key;
|
||||
}
|
||||
public override string LicenseKey {
|
||||
|
@@ -67,9 +67,10 @@ namespace System.ComponentModel {
|
||||
/// </devdoc>
|
||||
[HostProtection(SharedState = true)]
|
||||
internal sealed class ReflectEventDescriptor : EventDescriptor {
|
||||
|
||||
#if !MONO
|
||||
private static readonly Type[] argsNone = new Type[0];
|
||||
private static readonly object noDefault = new object();
|
||||
#endif
|
||||
|
||||
private Type type; // the delegate type for the event
|
||||
private readonly Type componentClass; // the class of the component this info is for
|
||||
|
@@ -64,7 +64,9 @@ namespace System.ComponentModel {
|
||||
|
||||
private static TraceSwitch PropDescCreateSwitch = new TraceSwitch("PropDescCreate", "ReflectPropertyDescriptor: Dump errors when creating property info");
|
||||
private static TraceSwitch PropDescUsageSwitch = new TraceSwitch("PropDescUsage", "ReflectPropertyDescriptor: Debug propertydescriptor usage");
|
||||
#if !MONO
|
||||
private static TraceSwitch PropDescSwitch = new TraceSwitch("PropDesc", "ReflectPropertyDescriptor: Debug property descriptor");
|
||||
#endif
|
||||
|
||||
private static readonly int BitDefaultValueQueried = BitVector32.CreateMask();
|
||||
private static readonly int BitGetQueried = BitVector32.CreateMask(BitDefaultValueQueried);
|
||||
@@ -417,12 +419,12 @@ namespace System.ComponentModel {
|
||||
else {
|
||||
args = new Type[] {receiverType};
|
||||
}
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
IntSecurity.FullReflection.Assert();
|
||||
try {
|
||||
#endif
|
||||
resetMethod = FindMethod(componentClass, "Reset" + Name, args, typeof(void), /* publicOnly= */ false);
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
}
|
||||
finally {
|
||||
CodeAccessPermission.RevertAssert();
|
||||
@@ -524,13 +526,13 @@ namespace System.ComponentModel {
|
||||
args = new Type[] {receiverType};
|
||||
}
|
||||
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
IntSecurity.FullReflection.Assert();
|
||||
try {
|
||||
#endif
|
||||
shouldSerializeMethod = FindMethod(componentClass, "ShouldSerialize" + Name,
|
||||
args, typeof(Boolean), /* publicOnly= */ false);
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
}
|
||||
finally {
|
||||
CodeAccessPermission.RevertAssert();
|
||||
|
@@ -1635,12 +1635,12 @@ namespace System.ComponentModel {
|
||||
Type converterType = GetTypeFromName(instanceAttr.ConverterTypeName);
|
||||
if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType))
|
||||
{
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
try {
|
||||
IntSecurity.FullReflection.Assert();
|
||||
#endif
|
||||
return (TypeConverter)ReflectTypeDescriptionProvider.CreateInstance(converterType, _type);
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
} finally {
|
||||
CodeAccessPermission.RevertAssert();
|
||||
}
|
||||
@@ -1665,12 +1665,12 @@ namespace System.ComponentModel {
|
||||
Type converterType = GetTypeFromName(typeAttr.ConverterTypeName);
|
||||
if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType))
|
||||
{
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
try {
|
||||
IntSecurity.FullReflection.Assert();
|
||||
#endif
|
||||
_converter = (TypeConverter)ReflectTypeDescriptionProvider.CreateInstance(converterType, _type);
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
} finally {
|
||||
CodeAccessPermission.RevertAssert();
|
||||
}
|
||||
|
@@ -28,8 +28,10 @@ namespace System.ComponentModel {
|
||||
|
||||
private const string s_UseCompatibleTypeConverterBehavior = "UseCompatibleTypeConverterBehavior";
|
||||
private static volatile bool useCompatibleTypeConversion = false;
|
||||
#if !MONO
|
||||
private static volatile bool firstLoadAppSetting = true;
|
||||
private static object loadAppSettingLock = new Object();
|
||||
#endif
|
||||
|
||||
private static bool UseCompatibleTypeConversion {
|
||||
get {
|
||||
|
@@ -1 +1 @@
|
||||
cf77c9972b2967219bba6e0992252ca86961ca7c
|
||||
0783e121a8b8058a221c9497594d8d4597e24dda
|
@@ -75,7 +75,7 @@ namespace System.ComponentModel {
|
||||
}
|
||||
|
||||
protected Win32Exception(SerializationInfo info, StreamingContext context) : base (info, context) {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
IntSecurity.UnmanagedCode.Demand();
|
||||
#endif
|
||||
nativeErrorCode = info.GetInt32("NativeErrorCode");
|
||||
|
@@ -93,7 +93,7 @@ namespace System.ComponentModel.Design {
|
||||
Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"rawfile: " + rawFile);
|
||||
string codeBase;
|
||||
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
// FileIOPermission is required for ApplicationBase in URL-hosted domains
|
||||
FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted);
|
||||
perm.Assert();
|
||||
@@ -133,7 +133,7 @@ namespace System.ComponentModel.Design {
|
||||
// file://fullpath/foo.exe
|
||||
//
|
||||
string fileName;
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted);
|
||||
perm.Assert();
|
||||
try
|
||||
@@ -166,7 +166,7 @@ namespace System.ComponentModel.Design {
|
||||
else if(!resourceAssembly.IsDynamic) { // EscapedCodeBase won't be supported by emitted assemblies anyway
|
||||
Debug.WriteLineIf(RuntimeLicenseContextSwitch.TraceVerbose,"resourceAssembly is not null");
|
||||
string fileName;
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted);
|
||||
perm.Assert();
|
||||
#endif
|
||||
@@ -176,7 +176,7 @@ namespace System.ComponentModel.Design {
|
||||
}
|
||||
finally
|
||||
{
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
CodeAccessPermission.RevertAssert();
|
||||
#endif
|
||||
}
|
||||
@@ -258,7 +258,7 @@ namespace System.ComponentModel.Design {
|
||||
|
||||
static Stream OpenRead(Uri resourceUri) {
|
||||
Stream result = null;
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
PermissionSet perms = new PermissionSet(PermissionState.Unrestricted);
|
||||
|
||||
perms.Assert();
|
||||
@@ -271,7 +271,7 @@ namespace System.ComponentModel.Design {
|
||||
catch (Exception e) {
|
||||
Debug.Fail(e.ToString());
|
||||
}
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
finally {
|
||||
CodeAccessPermission.RevertAssert();
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ namespace System.Diagnostics {
|
||||
public static TraceListenerCollection Listeners {
|
||||
[HostProtection(SharedState=true)]
|
||||
get {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
// Do a full damand
|
||||
new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
|
||||
#endif
|
||||
@@ -113,7 +113,7 @@ namespace System.Diagnostics {
|
||||
/// </devdoc>
|
||||
[System.Diagnostics.Conditional("TRACE")]
|
||||
public static void Close() {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
// Do a full damand
|
||||
new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
|
||||
#endif
|
||||
|
@@ -30,7 +30,7 @@ namespace System.Diagnostics {
|
||||
get {
|
||||
if (stackTrace == null)
|
||||
stackTrace = Environment.StackTrace;
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
else
|
||||
new EnvironmentPermission(PermissionState.Unrestricted).Demand();
|
||||
#endif
|
||||
@@ -77,7 +77,7 @@ namespace System.Diagnostics {
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
[ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
|
||||
private static void InitProcessInfo() {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
// Demand unmanaged code permission
|
||||
new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
|
||||
#endif
|
||||
|
@@ -18,8 +18,10 @@ namespace System.Diagnostics {
|
||||
[ThreadStatic]
|
||||
static int indentLevel;
|
||||
static volatile int indentSize;
|
||||
#if CONFIGURATION_DEP
|
||||
static volatile bool settingsInitialized;
|
||||
static volatile bool defaultInitialized;
|
||||
#endif
|
||||
|
||||
|
||||
// this is internal so TraceSource can use it. We want to lock on the same object because both TraceInternal and
|
||||
@@ -62,7 +64,7 @@ namespace System.Diagnostics {
|
||||
internal static string AppName {
|
||||
get {
|
||||
if (appName == null) {
|
||||
#if FEATURE_MONO_CAS
|
||||
#if MONO_FEATURE_CAS
|
||||
new EnvironmentPermission(EnvironmentPermissionAccess.Read, "Path").Assert();
|
||||
#endif
|
||||
appName = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
|
||||
@@ -303,7 +305,9 @@ namespace System.Diagnostics {
|
||||
// in the System.Diagnostics.Trace class
|
||||
static internal void Refresh() {
|
||||
lock (critSec) {
|
||||
#if CONFIGURATION_DEP
|
||||
settingsInitialized = false;
|
||||
#endif
|
||||
listeners = null;
|
||||
}
|
||||
InitializeSettings();
|
||||
|
Reference in New Issue
Block a user