You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -1,102 +1,102 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.BINDPTR.#lpfuncdesc", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.BINDPTR.#lptcomp", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.BINDPTR.#lpvardesc", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.CriticalHandle.#handle", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.DISPPARAMS.#rgdispidNamedArgs", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.DISPPARAMS.#rgvarg", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.EXCEPINFO.#pfnDeferredFillIn", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.EXCEPINFO.#pvReserved", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.FUNCDESC.#lprgelemdescParam", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.FUNCDESC.#lprgscode", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.PARAMDESC.#lpVarValue", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.SafeHandle.#handle", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.TYPEATTR.#lpstrSchema", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.TYPEDESC.#lpValue", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.VARDESC+DESCUNION.#lpvarValue", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.BINDPTR.#lpfuncdesc", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.BINDPTR.#lptcomp", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.BINDPTR.#lpvardesc", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DISPPARAMS.#rgdispidNamedArgs", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DISPPARAMS.#rgvarg", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.EXCEPINFO.#pfnDeferredFillIn", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.EXCEPINFO.#pvReserved", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FUNCDESC.#lprgelemdescParam", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FUNCDESC.#lprgscode", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDLDESC.#dwReserved", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.PARAMDESC.#lpVarValue", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYPEATTR.#lpstrSchema", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYPEDESC.#lpValue", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.VARDESC+DESCUNION.#lpvarValue", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Threading.NativeOverlapped.#EventHandle", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Threading.NativeOverlapped.#InternalHigh", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Threading.NativeOverlapped.#InternalLow", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2105:ArrayFieldsShouldNotBeReadOnly", Scope="member", Target="System.IO.Path.#InvalidPathChars", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2105:ArrayFieldsShouldNotBeReadOnly", Scope="member", Target="System.Type.#EmptyTypes", Justification="[....]: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.BinaryWriter.#Null", Justification="[....]: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.Stream.#Null", Justification="[....]: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.StreamReader.#Null", Justification="[....]: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.StreamWriter.#Null", Justification="[....]: Underlying type is actually Immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.TextReader.#Null", Justification="[....]: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.TextWriter.#Null", Justification="[....]: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Diagnostics.Tracing.EventSource.#GenerateGuidFromName(System.String)", Justification="[....]: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.IO.IsolatedStorage.IsolatedStorage.#GetHash(System.IO.Stream)", Justification="[....]: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.IO.IsolatedStorage.IsolatedStorageFile.#GetStrongHashSuitableForObjectName(System.String)", Justification="[....]: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Policy.HashMembershipCondition.#ParseHashAlgorithm()", Justification="[....]: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Policy.HashMembershipCondition.#.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)", Justification="[....]: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#IsSemiWeakKey(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#IsWeakKey(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#get_Key()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#set_Key(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#GenerateKey()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.DSACryptoServiceProvider.#.ctor(System.Int32,System.Security.Cryptography.CspParameters)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5356:DSACannotBeUsed", Scope="member", Target="System.Security.Cryptography.DSASignatureFormatter.#CreateSignature(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.HMACMD5.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.HMACMD5.#.ctor(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.HMACRIPEMD160.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.HMACRIPEMD160.#.ctor(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.HMACSHA1.#.ctor(System.Byte[],System.Boolean)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.MACTripleDES.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.MACTripleDES.#.ctor(System.String,System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.MD5.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.MD5CryptoServiceProvider.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2CryptoServiceProvider.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2CryptoServiceProvider.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2CryptoServiceProvider.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#HashCore(System.Byte[],System.Int32,System.Int32)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#HashFinal()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#Initialize()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#MDTransform(System.UInt32*,System.UInt32*,System.Byte*)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#_EndHash()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#_HashData(System.Byte[],System.Int32,System.Int32)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter.#DecryptKeyExchange(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RSAOAEPKeyExchangeFormatter.#CreateKeyExchange(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.Rijndael.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.RijndaelManaged.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.RijndaelManaged.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.RijndaelManaged.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1CryptoServiceProvider.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#HashCore(System.Byte[],System.Int32,System.Int32)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#HashFinal()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#Initialize()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#SHATransform(System.UInt32*,System.UInt32*,System.Byte*)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#_EndHash()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#_HashData(System.Byte[],System.Int32,System.Int32)", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#Create()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#IsWeakKey(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#get_Key()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#set_Key(System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#.ctor()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#GenerateKey()", Justification="[....]: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.BINDPTR.#lpfuncdesc", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.BINDPTR.#lptcomp", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.BINDPTR.#lpvardesc", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.CriticalHandle.#handle", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.DISPPARAMS.#rgdispidNamedArgs", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.DISPPARAMS.#rgvarg", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.EXCEPINFO.#pfnDeferredFillIn", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.EXCEPINFO.#pvReserved", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.FUNCDESC.#lprgelemdescParam", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.FUNCDESC.#lprgscode", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.PARAMDESC.#lpVarValue", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.SafeHandle.#handle", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.TYPEATTR.#lpstrSchema", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.TYPEDESC.#lpValue", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.VARDESC+DESCUNION.#lpvarValue", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.BINDPTR.#lpfuncdesc", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.BINDPTR.#lptcomp", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.BINDPTR.#lpvardesc", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DISPPARAMS.#rgdispidNamedArgs", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DISPPARAMS.#rgvarg", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.EXCEPINFO.#pfnDeferredFillIn", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.EXCEPINFO.#pvReserved", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FUNCDESC.#lprgelemdescParam", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FUNCDESC.#lprgscode", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDLDESC.#dwReserved", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.PARAMDESC.#lpVarValue", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYPEATTR.#lpstrSchema", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYPEDESC.#lpValue", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.VARDESC+DESCUNION.#lpvarValue", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Threading.NativeOverlapped.#EventHandle", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Threading.NativeOverlapped.#InternalHigh", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Threading.NativeOverlapped.#InternalLow", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2105:ArrayFieldsShouldNotBeReadOnly", Scope="member", Target="System.IO.Path.#InvalidPathChars", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2105:ArrayFieldsShouldNotBeReadOnly", Scope="member", Target="System.Type.#EmptyTypes", Justification="matell: We already shipped this and it would be a breaking change to fix it")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.BinaryWriter.#Null", Justification="matell: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.Stream.#Null", Justification="matell: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.StreamReader.#Null", Justification="matell: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.StreamWriter.#Null", Justification="matell: Underlying type is actually Immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.TextReader.#Null", Justification="matell: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Security","CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Scope="member", Target="System.IO.TextWriter.#Null", Justification="matell: Underlying type is actually immutable")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Diagnostics.Tracing.EventSource.#GenerateGuidFromName(System.String)", Justification="matell: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.IO.IsolatedStorage.IsolatedStorage.#GetHash(System.IO.Stream)", Justification="matell: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.IO.IsolatedStorage.IsolatedStorageFile.#GetStrongHashSuitableForObjectName(System.String)", Justification="matell: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Policy.HashMembershipCondition.#ParseHashAlgorithm()", Justification="matell: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Policy.HashMembershipCondition.#.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)", Justification="matell: Existing code that needs to interop with other components using SHA-1")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#IsSemiWeakKey(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#IsWeakKey(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#get_Key()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DES.#set_Key(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5351:DESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.DESCryptoServiceProvider.#GenerateKey()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.DSACryptoServiceProvider.#.ctor(System.Int32,System.Security.Cryptography.CspParameters)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5356:DSACannotBeUsed", Scope="member", Target="System.Security.Cryptography.DSASignatureFormatter.#CreateSignature(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.HMACMD5.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.HMACMD5.#.ctor(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.HMACRIPEMD160.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.HMACRIPEMD160.#.ctor(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.HMACSHA1.#.ctor(System.Byte[],System.Boolean)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.MACTripleDES.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.MACTripleDES.#.ctor(System.String,System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.MD5.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5350:MD5CannotBeUsed", Scope="member", Target="System.Security.Cryptography.MD5CryptoServiceProvider.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2CryptoServiceProvider.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2CryptoServiceProvider.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5352:RC2CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RC2CryptoServiceProvider.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#HashCore(System.Byte[],System.Int32,System.Int32)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#HashFinal()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#Initialize()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#MDTransform(System.UInt32*,System.UInt32*,System.Byte*)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#_EndHash()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5355:RIPEMD160IsNotRecommended", Scope="member", Target="System.Security.Cryptography.RIPEMD160Managed.#_HashData(System.Byte[],System.Int32,System.Int32)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter.#DecryptKeyExchange(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.RSAOAEPKeyExchangeFormatter.#CreateKeyExchange(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.Rijndael.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.RijndaelManaged.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.RijndaelManaged.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5357:RijndaelCannotBeUsed", Scope="member", Target="System.Security.Cryptography.RijndaelManaged.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1CryptoServiceProvider.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#HashCore(System.Byte[],System.Int32,System.Int32)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#HashFinal()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#Initialize()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#SHATransform(System.UInt32*,System.UInt32*,System.Byte*)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#_EndHash()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5354:SHA1CannotBeUsed", Scope="member", Target="System.Security.Cryptography.SHA1Managed.#_HashData(System.Byte[],System.Int32,System.Int32)", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#Create()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#IsWeakKey(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#get_Key()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDES.#set_Key(System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#.ctor()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#CreateDecryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#CreateEncryptor(System.Byte[],System.Byte[])", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
[module: SuppressMessage("Microsoft.Cryptographic.Standard","CA5353:TripleDESCannotBeUsed", Scope="member", Target="System.Security.Cryptography.TripleDESCryptoServiceProvider.#GenerateKey()", Justification="matell: By design. Needed for implementation of security algorithms")]
|
||||
|
@@ -164,8 +164,10 @@ namespace System
|
||||
if (GC.GetGeneration(buffer) < GC.MaxGeneration)
|
||||
{
|
||||
// The buffer is not aged, so put it in the non-aged free list.
|
||||
m_moreThanFreeListNeeded = true;
|
||||
PinnableBufferCacheEventSource.Log.FreeBufferStillTooYoung(m_CacheName, m_NotGen2.Count);
|
||||
m_NotGen2.Add(buffer);
|
||||
m_gen1CountAtLastRestock = GC.CollectionCount(GC.MaxGeneration - 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -310,6 +312,7 @@ namespace System
|
||||
/// otherwise, we root the cache to the Gen2GcCallback object, and leak the cache even when
|
||||
/// the application no longer needs it.
|
||||
/// </summary>
|
||||
[System.Security.SecuritySafeCritical]
|
||||
private static bool Gen2GcCallbackFunc(object targetObj)
|
||||
{
|
||||
return ((PinnableBufferCache)(targetObj)).TrimFreeListIfNeeded();
|
||||
@@ -509,6 +512,11 @@ namespace System
|
||||
~Gen2GcCallback()
|
||||
{
|
||||
// Check to see if the target object is still alive.
|
||||
if (!m_weakTargetObj.IsAllocated)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
object targetObj = m_weakTargetObj.Target;
|
||||
if (targetObj == null)
|
||||
{
|
||||
@@ -636,6 +644,7 @@ namespace System
|
||||
[Event(21)]
|
||||
public void WalkFreeListResult(string cacheName, int freeListCount, int gen0BuffersInFreeList) { if (IsEnabled()) WriteEvent(21, cacheName, freeListCount, gen0BuffersInFreeList); }
|
||||
|
||||
|
||||
static internal ulong AddressOf(object obj)
|
||||
{
|
||||
var asByteArray = obj as byte[];
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
// File: RegistryOptions.cs
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// <OWNER>JFREE</OWNER>
|
||||
//
|
||||
// Implements Microsoft.Win32.RegistryOptions
|
||||
//
|
||||
@@ -27,4 +27,4 @@ namespace Microsoft.Win32 {
|
||||
/// BackupRestore = Win32Native.REG_OPTION_BACKUP_RESTORE,// 0x0004
|
||||
};
|
||||
}
|
||||
#endif // !FEATURE_PAL
|
||||
#endif // !FEATURE_PAL
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
// File: RegistryOptions.cs
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// <OWNER>JFREE</OWNER>
|
||||
//
|
||||
// Implements Microsoft.Win32.RegistryView
|
||||
//
|
||||
@@ -21,4 +21,4 @@ namespace Microsoft.Win32 {
|
||||
Registry32 = Win32Native.KEY_WOW64_32KEY, // 0x0200 operate on the 32-bit registry view
|
||||
};
|
||||
}
|
||||
#endif // !FEATURE_PAL
|
||||
#endif // !FEATURE_PAL
|
@@ -305,6 +305,18 @@ namespace Microsoft.Win32 {
|
||||
return CreateSubKeyInternal(subkey, permissionCheck, null, options);
|
||||
}
|
||||
|
||||
[ComVisible(false)]
|
||||
public RegistryKey CreateSubKey(String subkey, bool writable)
|
||||
{
|
||||
return CreateSubKeyInternal(subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, null, RegistryOptions.None);
|
||||
}
|
||||
|
||||
[ComVisible(false)]
|
||||
public RegistryKey CreateSubKey(String subkey, bool writable, RegistryOptions options)
|
||||
{
|
||||
return CreateSubKeyInternal(subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, null, options);
|
||||
}
|
||||
|
||||
|
||||
#if FEATURE_MACL
|
||||
[ComVisible(false)]
|
||||
@@ -755,6 +767,13 @@ namespace Microsoft.Win32 {
|
||||
return InternalOpenSubKey(name, permissionCheck, GetRegistryKeyAccess(permissionCheck));
|
||||
}
|
||||
|
||||
[System.Security.SecuritySafeCritical]
|
||||
[ComVisible(false)]
|
||||
public RegistryKey OpenSubKey(String name, RegistryRights rights)
|
||||
{
|
||||
return InternalOpenSubKey(name, this.checkMode, (int)rights);
|
||||
}
|
||||
|
||||
[System.Security.SecuritySafeCritical] // auto-generated
|
||||
[ComVisible(false)]
|
||||
[ResourceExposure(ResourceScope.Machine)]
|
||||
@@ -795,8 +814,8 @@ namespace Microsoft.Win32 {
|
||||
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// This required no security checks. This is to get around the Deleting SubKeys which only require
|
||||
// write permission. They call OpenSubKey which required read. Now instead call this function w/o security checks
|
||||
[System.Security.SecurityCritical] // auto-generated
|
||||
@@ -830,6 +849,9 @@ namespace Microsoft.Win32 {
|
||||
*/
|
||||
[ResourceExposure(ResourceScope.Machine)]
|
||||
[ResourceConsumption(ResourceScope.Machine)]
|
||||
#if FEATURE_CORECLR
|
||||
[System.Security.SecurityCritical]
|
||||
#endif
|
||||
public RegistryKey OpenSubKey(String name) {
|
||||
return OpenSubKey(name, false);
|
||||
}
|
||||
|
@@ -31,6 +31,11 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
SetHandle(preexistingHandle);
|
||||
}
|
||||
|
||||
#if MOBILE
|
||||
override protected bool ReleaseHandle() {
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
[System.Security.SecurityCritical]
|
||||
override protected bool ReleaseHandle() {
|
||||
return (RegCloseKey(handle) == Win32Native.ERROR_SUCCESS);
|
||||
@@ -41,6 +46,7 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
ResourceExposure(ResourceScope.None),
|
||||
ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
internal static extern int RegCloseKey(IntPtr hKey);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif // !FEATURE_PAL
|
||||
|
@@ -29,21 +29,6 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
[System.Security.SecurityCritical] // auto-generated_required
|
||||
public sealed class SafeWaitHandle : SafeHandleZeroOrMinusOneIsInvalid
|
||||
{
|
||||
|
||||
|
||||
// Special case flags for Mutexes enables workaround for known OS bug at
|
||||
// http://support.microsoft.com/default.aspx?scid=kb;en-us;889318
|
||||
// One machine-wide mutex serializes all OpenMutex and CloseHandle operations.
|
||||
|
||||
// bIsMutex: if true, we need to grab machine-wide mutex before doing any Close ops.
|
||||
// Initialized to false by the runtime.
|
||||
private bool bIsMutex;
|
||||
|
||||
// bIsMutex: if true, we need to avoid grabbing the machine-wide mutex before Close ops,
|
||||
// since that mutex is, of course, this very handle.
|
||||
// Initialized to false by the runtime.
|
||||
private bool bIsReservedMutex;
|
||||
|
||||
// Called by P/Invoke marshaler
|
||||
private SafeWaitHandle() : base(true)
|
||||
{
|
||||
@@ -63,42 +48,9 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
#if MONO
|
||||
NativeEventCalls.CloseEvent_internal (handle);
|
||||
return true;
|
||||
#else
|
||||
#if !FEATURE_CORECLR
|
||||
if (!bIsMutex || Environment.HasShutdownStarted)
|
||||
return Win32Native.CloseHandle(handle);
|
||||
|
||||
bool bReturn = false;
|
||||
bool bMutexObtained = false;
|
||||
try
|
||||
{
|
||||
if (!bIsReservedMutex)
|
||||
{
|
||||
Mutex.AcquireReservedMutex(ref bMutexObtained);
|
||||
}
|
||||
bReturn = Win32Native.CloseHandle(handle);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (bMutexObtained)
|
||||
Mutex.ReleaseReservedMutex();
|
||||
}
|
||||
return bReturn;
|
||||
#else
|
||||
return Win32Native.CloseHandle(handle);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
internal void SetAsMutex()
|
||||
{
|
||||
bIsMutex = true;
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
internal void SetAsReservedMutex()
|
||||
{
|
||||
bIsReservedMutex = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -94,6 +94,8 @@ namespace Microsoft.Win32 {
|
||||
internal const int ERROR_NOT_ENOUGH_MEMORY = 8;
|
||||
|
||||
internal const int ERROR_MORE_DATA = 0xEA;
|
||||
internal const int ERROR_NOT_SUPPORTED = 50;
|
||||
internal const int ERROR_INVALID_PARAMETER = 0x57;
|
||||
|
||||
//
|
||||
// ETW Methods
|
||||
@@ -167,10 +169,32 @@ namespace Microsoft.Win32 {
|
||||
public int Type;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Call the ETW native API EventWriteTransfer and checks for invalid argument error.
|
||||
/// The implementation of EventWriteTransfer on some older OSes (Windows 2008) does not accept null relatedActivityId.
|
||||
/// So, for these cases we will retry the call with an empty Guid.
|
||||
/// </summary>
|
||||
internal static int EventWriteTransferWrapper(long registrationHandle,
|
||||
ref EventDescriptor eventDescriptor,
|
||||
Guid* activityId,
|
||||
Guid* relatedActivityId,
|
||||
int userDataCount,
|
||||
EventProvider.EventData* userData)
|
||||
{
|
||||
int HResult = EventWriteTransfer(registrationHandle, ref eventDescriptor, activityId, relatedActivityId, userDataCount, userData);
|
||||
if (HResult == ERROR_INVALID_PARAMETER && relatedActivityId == null)
|
||||
{
|
||||
Guid emptyGuid = Guid.Empty;
|
||||
HResult = EventWriteTransfer(registrationHandle, ref eventDescriptor, activityId, &emptyGuid, userDataCount, userData);
|
||||
}
|
||||
|
||||
return HResult;
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")]
|
||||
[DllImport(Win32Native.ADVAPI32, ExactSpelling = true, EntryPoint = "EventWriteTransfer", CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
|
||||
[SuppressUnmanagedCodeSecurityAttribute] // Don't do security checks
|
||||
internal static extern int EventWriteTransfer(
|
||||
private static extern int EventWriteTransfer(
|
||||
[In] long registrationHandle,
|
||||
[In] ref EventDescriptor eventDescriptor,
|
||||
[In] Guid* activityId,
|
||||
@@ -193,7 +217,23 @@ namespace Microsoft.Win32 {
|
||||
[SuppressUnmanagedCodeSecurityAttribute] // Don't do security checks
|
||||
internal static extern int EventActivityIdControl([In] ActivityControl ControlCode, [In][Out] ref Guid ActivityId);
|
||||
|
||||
// Support for EnumerateTraceGuidsEx
|
||||
internal enum EVENT_INFO_CLASS
|
||||
{
|
||||
BinaryTrackInfo,
|
||||
SetEnableAllKeywords,
|
||||
SetTraits,
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")]
|
||||
[DllImport(Win32Native.ADVAPI32, ExactSpelling = true, EntryPoint = "EventSetInformation", CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
|
||||
[SuppressUnmanagedCodeSecurityAttribute] // Don't do security checks
|
||||
internal static extern int EventSetInformation(
|
||||
[In] long registrationHandle,
|
||||
[In] EVENT_INFO_CLASS informationClass,
|
||||
[In] void* eventInformation,
|
||||
[In] int informationLength);
|
||||
|
||||
// Support for EnumerateTraceGuidsEx
|
||||
internal enum TRACE_QUERY_INFO_CLASS
|
||||
{
|
||||
TraceGuidQueryList,
|
||||
@@ -241,7 +281,7 @@ namespace Microsoft.Win32 {
|
||||
ref int ReturnLength);
|
||||
|
||||
}
|
||||
#if !FEATURE_PAL && !FEATURE_CORECLR
|
||||
#if FEATURE_COMINTEROP
|
||||
[SecurityCritical]
|
||||
[DllImport("combase.dll", PreserveSig = true)]
|
||||
internal static extern int RoGetActivationFactory(
|
||||
|
@@ -1 +1 @@
|
||||
4a257e119ae905e5fb449f7709050e0aa08969be
|
||||
9c2df18a2daf5d191612169f1bcc5d0cb9f10b82
|
173
external/referencesource/mscorlib/system/AppContext/AppContext.cs
vendored
Normal file
173
external/referencesource/mscorlib/system/AppContext/AppContext.cs
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public static class AppContext
|
||||
{
|
||||
[Flags]
|
||||
private enum SwitchValueState
|
||||
{
|
||||
HasFalseValue = 0x1,
|
||||
HasTrueValue = 0x2,
|
||||
HasLookedForOverride = 0x4,
|
||||
UnknownValue = 0x8 // Has no default and could not find an override
|
||||
}
|
||||
private static Dictionary<string, SwitchValueState> s_switchMap = new Dictionary<string, SwitchValueState>();
|
||||
private static readonly object s_syncLock = new object();
|
||||
|
||||
public static string BaseDirectory
|
||||
{
|
||||
#if FEATURE_CORECLR
|
||||
[System.Security.SecuritySafeCritical]
|
||||
#endif
|
||||
get
|
||||
{
|
||||
// The value of APP_CONTEXT_BASE_DIRECTORY key has to be a string and it is not allowed to be any other type.
|
||||
// Otherwise the caller will get invalid cast exception
|
||||
return (string) AppDomain.CurrentDomain.GetData("APP_CONTEXT_BASE_DIRECTORY") ?? AppDomain.CurrentDomain.BaseDirectory;
|
||||
}
|
||||
}
|
||||
|
||||
#region Switch APIs
|
||||
|
||||
static AppContext()
|
||||
{
|
||||
// populate the AppContext with the default set of values
|
||||
AppContextDefaultValues.PopulateDefaultValues();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to get the value of the switch.
|
||||
/// </summary>
|
||||
/// <param name="switchName">The name of the switch</param>
|
||||
/// <param name="isEnabled">A variable where to place the value of the switch</param>
|
||||
/// <returns>A return value of true represents that the switch was set and <paramref name="isEnabled"/> contains the value of the switch</returns>
|
||||
public static bool TryGetSwitch(string switchName, out bool isEnabled)
|
||||
{
|
||||
if (switchName == null)
|
||||
throw new ArgumentNullException("switchName");
|
||||
if (switchName.Length == 0)
|
||||
throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "switchName");
|
||||
|
||||
// By default, the switch is not enabled.
|
||||
isEnabled = false;
|
||||
|
||||
SwitchValueState switchValue;
|
||||
lock (s_switchMap)
|
||||
{
|
||||
if (s_switchMap.TryGetValue(switchName, out switchValue))
|
||||
{
|
||||
// The value is in the dictionary.
|
||||
// There are 3 cases here:
|
||||
// 1. The value of the switch is 'unknown'. This means that the switch name is not known to the system (either via defaults or checking overrides).
|
||||
// Example: This is the case when, during a servicing event, a switch is added to System.Xml which ships before mscorlib. The value of the switch
|
||||
// Will be unknown to mscorlib.dll and we want to prevent checking the overrides every time we check this switch
|
||||
// 2. The switch has a valid value AND we have read the overrides for it
|
||||
// Example: TryGetSwitch is called for a switch set via SetSwitch
|
||||
// 3. The switch has the default value and we need to check for overrides
|
||||
// Example: TryGetSwitch is called for the first time for a switch that has a default value
|
||||
|
||||
// 1. The value is unknown
|
||||
if (switchValue == SwitchValueState.UnknownValue)
|
||||
{
|
||||
isEnabled = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// We get the value of isEnabled from the value that we stored in the dictionary
|
||||
isEnabled = (switchValue & SwitchValueState.HasTrueValue) == SwitchValueState.HasTrueValue;
|
||||
|
||||
// 2. The switch has a valid value AND we have checked for overrides
|
||||
if ((switchValue & SwitchValueState.HasLookedForOverride) == SwitchValueState.HasLookedForOverride)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// 3. The switch has a valid value, but we need to check for overrides.
|
||||
// Regardless of whether or not the switch has an override, we need to update the value to reflect
|
||||
// the fact that we checked for overrides.
|
||||
bool overrideValue;
|
||||
if (AppContextDefaultValues.TryGetSwitchOverride(switchName, out overrideValue))
|
||||
{
|
||||
// we found an override!
|
||||
isEnabled = overrideValue;
|
||||
}
|
||||
|
||||
// Update the switch in the dictionary to mark it as 'checked for override'
|
||||
s_switchMap[switchName] = (isEnabled ? SwitchValueState.HasTrueValue : SwitchValueState.HasFalseValue)
|
||||
| SwitchValueState.HasLookedForOverride;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The value is NOT in the dictionary
|
||||
// In this case we need to see if we have an override defined for the value.
|
||||
// There are 2 cases:
|
||||
// 1. The value has an override specified. In this case we need to add the value to the dictionary
|
||||
// and mark it as checked for overrides
|
||||
// Example: In a servicing event, System.Xml introduces a switch and an override is specified.
|
||||
// The value is not found in mscorlib (as System.Xml ships independent of mscorlib)
|
||||
// 2. The value does not have an override specified
|
||||
// In this case, we want to capture the fact that we looked for a value and found nothing by adding
|
||||
// an entry in the dictionary with the 'sentinel' value of 'SwitchValueState.UnknownValue'.
|
||||
// Example: This will prevent us from trying to find overrides for values that we don't have in the dictionary
|
||||
|
||||
// 1. The value has an override specified.
|
||||
bool overrideValue;
|
||||
if (AppContextDefaultValues.TryGetSwitchOverride(switchName, out overrideValue))
|
||||
{
|
||||
isEnabled = overrideValue;
|
||||
|
||||
// Update the switch in the dictionary to mark it as 'checked for override'
|
||||
s_switchMap[switchName] = (isEnabled ? SwitchValueState.HasTrueValue : SwitchValueState.HasFalseValue)
|
||||
| SwitchValueState.HasLookedForOverride;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 2. The value does not have an override.
|
||||
s_switchMap[switchName] = SwitchValueState.UnknownValue;
|
||||
}
|
||||
}
|
||||
return false; // we did not find a value for the switch
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assign a switch a value
|
||||
/// </summary>
|
||||
/// <param name="switchName">The name of the switch</param>
|
||||
/// <param name="isEnabled">The value to assign</param>
|
||||
public static void SetSwitch(string switchName, bool isEnabled)
|
||||
{
|
||||
if (switchName == null)
|
||||
throw new ArgumentNullException("switchName");
|
||||
if (switchName.Length == 0)
|
||||
throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "switchName");
|
||||
|
||||
lock (s_syncLock)
|
||||
{
|
||||
// Store the new value and the fact that we checked in the dictionary
|
||||
s_switchMap[switchName] = (isEnabled ? SwitchValueState.HasTrueValue : SwitchValueState.HasFalseValue)
|
||||
| SwitchValueState.HasLookedForOverride;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is going to be called from the AppContextDefaultValues class when setting up the
|
||||
/// default values for the switches. !!!! This method is called during the static constructor so it does not
|
||||
/// take a lock !!!! If you are planning to use this outside of that, please ensure proper locking.
|
||||
/// </summary>
|
||||
internal static void DefineSwitchDefault(string switchName, bool isEnabled)
|
||||
{
|
||||
s_switchMap[switchName] = isEnabled ? SwitchValueState.HasTrueValue : SwitchValueState.HasFalseValue;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
34
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.Defaults.Central.cs
vendored
Normal file
34
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.Defaults.Central.cs
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
|
||||
//
|
||||
// This file is used to provide an implementation for defining a default value
|
||||
// This should be compiled only in mscorlib where the AppContext class is available
|
||||
//
|
||||
|
||||
namespace System
|
||||
{
|
||||
internal static partial class AppContextDefaultValues
|
||||
{
|
||||
/// <summary>
|
||||
/// This method allows reading the override for a switch.
|
||||
/// The implementation is platform specific
|
||||
/// </summary>
|
||||
public static bool TryGetSwitchOverride(string switchName, out bool overrideValue)
|
||||
{
|
||||
// The default value for a switch is 'false'
|
||||
overrideValue = false;
|
||||
|
||||
// Read the override value
|
||||
bool overrideFound = false;
|
||||
|
||||
// This partial method will be removed if there are no implementations of it.
|
||||
TryGetSwitchOverridePartial(switchName, ref overrideFound, ref overrideValue);
|
||||
|
||||
return overrideFound;
|
||||
}
|
||||
}
|
||||
}
|
62
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.Defaults.cs
vendored
Normal file
62
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.Defaults.cs
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
using System;
|
||||
|
||||
namespace System
|
||||
{
|
||||
internal static partial class AppContextDefaultValues
|
||||
{
|
||||
|
||||
internal static readonly string SwitchNoAsyncCurrentCulture = "Switch.System.Globalization.NoAsyncCurrentCulture";
|
||||
internal static readonly string SwitchThrowExceptionIfDisposedCancellationTokenSource = "Switch.System.Threading.ThrowExceptionIfDisposedCancellationTokenSource";
|
||||
internal static readonly string SwitchPreserveEventListnerObjectIdentity = "Switch.System.Diagnostics.EventSource.PreserveEventListnerObjectIdentity";
|
||||
|
||||
|
||||
// This is a partial method. Platforms can provide an implementation of it that will set override values
|
||||
// from whatever mechanism is available on that platform. If no implementation is provided, the compiler is going to remove the calls
|
||||
// to it from the code
|
||||
// We are going to have an implementation of this method for the Desktop platform that will read the overrides from app.config, registry and
|
||||
// the shim database. Additional implementation can be provided for other platforms.
|
||||
static partial void PopulateOverrideValuesPartial();
|
||||
|
||||
static partial void PopulateDefaultValuesPartial(string platformIdentifier, string profile, int version)
|
||||
{
|
||||
// When defining a new switch you should add it to the last known version.
|
||||
// For instance, if you are adding a switch in .NET 4.6 (the release after 4.5.2) you should defined your switch
|
||||
// like this:
|
||||
// if (version <= 40502) ...
|
||||
// This ensures that all previous versions of that platform (up-to 4.5.2) will get the old behavior by default
|
||||
// NOTE: When adding a default value for a switch please make sure that the default value is added to ALL of the existing platforms!
|
||||
// NOTE: When adding a new if statement for the version please ensure that ALL previous switches are enabled (ie. don't use else if)
|
||||
switch (platformIdentifier)
|
||||
{
|
||||
case ".NETCore":
|
||||
case ".NETFramework":
|
||||
{
|
||||
if (version <= 40502)
|
||||
{
|
||||
AppContext.DefineSwitchDefault(SwitchNoAsyncCurrentCulture, true);
|
||||
AppContext.DefineSwitchDefault(SwitchThrowExceptionIfDisposedCancellationTokenSource, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "WindowsPhone":
|
||||
case "WindowsPhoneApp":
|
||||
{
|
||||
if (version <= 80100)
|
||||
{
|
||||
AppContext.DefineSwitchDefault(SwitchNoAsyncCurrentCulture, true);
|
||||
AppContext.DefineSwitchDefault(SwitchThrowExceptionIfDisposedCancellationTokenSource, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// At this point we should read the overrides if any are defined
|
||||
PopulateOverrideValuesPartial();
|
||||
}
|
||||
}
|
||||
}
|
136
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.DesktopOverrides.cs
vendored
Normal file
136
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.DesktopOverrides.cs
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
|
||||
namespace System
|
||||
{
|
||||
internal static partial class AppContextDefaultValues
|
||||
{
|
||||
/// <summary>
|
||||
/// This method is going to parse the <paramref name="overrides"/> parameter and set the values corresponding to them
|
||||
/// in the AppContext object
|
||||
/// </summary>
|
||||
[SecuritySafeCritical]
|
||||
static partial void PopulateOverrideValuesPartial()
|
||||
{
|
||||
// Retrieve the value from EE config.
|
||||
string overrides = System.Runtime.Versioning.CompatibilitySwitch.GetAppContextOverridesInternalCall();
|
||||
|
||||
// If we have no override values, do nothing.
|
||||
if (string.IsNullOrEmpty(overrides))
|
||||
return;
|
||||
|
||||
bool encounteredEquals = false, encounteredCharsInKey = false, encounteredCharsInValue = false;
|
||||
int previousSemicolonPos = -1, firstEqualsPos = -1;
|
||||
|
||||
// Iterate over the string one character at a time until we reach the end of the string.
|
||||
for (int currentPos = 0; currentPos <= overrides.Length; currentPos++)
|
||||
{
|
||||
// If the current position is either ';' or 'end-of-string' then we potentially have a key=value pair
|
||||
if (currentPos == overrides.Length || overrides[currentPos] == ';')
|
||||
{
|
||||
// We only have a key=value pair if we encountered an equals, characters in the key and in the value
|
||||
// portion of the pair.
|
||||
if (encounteredEquals && encounteredCharsInKey && encounteredCharsInValue)
|
||||
{
|
||||
// We compute the indexes in the string for key and value
|
||||
int firstCharOfKey = previousSemicolonPos + 1; //+1 because we don't take the ';' char
|
||||
int lenghtOfKey = firstEqualsPos - previousSemicolonPos - 1; //-1 because we don't take the '=' char
|
||||
string name = overrides.Substring(firstCharOfKey, lenghtOfKey);
|
||||
|
||||
int firstCharOfValue = firstEqualsPos + 1; // +1 because we don't count the '='
|
||||
int lengthOfValue = currentPos - firstEqualsPos - 1; // -1 because we don't count the '='
|
||||
string value = overrides.Substring(firstCharOfValue, lengthOfValue);
|
||||
|
||||
// apply the value only if it parses as a boolean
|
||||
bool switchValue;
|
||||
if (bool.TryParse(value, out switchValue))
|
||||
{
|
||||
// If multiple switches have the same name, the last value that we find will win.
|
||||
AppContext.SetSwitch(name, switchValue);
|
||||
}
|
||||
}
|
||||
previousSemicolonPos = currentPos;
|
||||
|
||||
// We need to reset these flags once we encounter a ';'
|
||||
encounteredCharsInKey = encounteredCharsInValue = encounteredEquals = false;
|
||||
}
|
||||
else if (overrides[currentPos] == '=')
|
||||
{
|
||||
// if the current character is '=' then we should flag it and remember it
|
||||
if (!encounteredEquals)
|
||||
{
|
||||
encounteredEquals = true;
|
||||
firstEqualsPos = currentPos;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need to know if the key or value contain any characters (other than ';' and '=');
|
||||
if (encounteredEquals)
|
||||
{
|
||||
encounteredCharsInValue = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
encounteredCharsInKey = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Note -- partial methods cannot return a value so we use refs to return information
|
||||
[SecuritySafeCritical]
|
||||
static partial void TryGetSwitchOverridePartial(string switchName, ref bool overrideFound, ref bool overrideValue)
|
||||
{
|
||||
string valueFromConfig = null;
|
||||
bool boolFromConfig;
|
||||
overrideFound = false;
|
||||
|
||||
// Read the value from the registry if we can (ie. the key exists)
|
||||
if (s_switchesRegKey != null)
|
||||
{
|
||||
// try to read it from the registry key and return null if the switch name is not found
|
||||
valueFromConfig = s_switchesRegKey.GetValue(switchName, (string)null) as string;
|
||||
}
|
||||
|
||||
// Note: valueFromConfig will be null only if the key is not found.
|
||||
// Read the value from the Shim database.
|
||||
if (valueFromConfig == null)
|
||||
{
|
||||
// We are only going to check the Shim Database for an override in this case
|
||||
valueFromConfig = System.Runtime.Versioning.CompatibilitySwitch.GetValue(switchName);
|
||||
}
|
||||
|
||||
if (valueFromConfig != null && bool.TryParse(valueFromConfig, out boolFromConfig))
|
||||
{
|
||||
// If we found a valid override value, we need to let the caller know that.
|
||||
overrideValue = boolFromConfig;
|
||||
overrideFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Cached registry key used to read value overrides from the registry
|
||||
private static RegistryKey s_switchesRegKey = OpenRegKeyNoThrow();
|
||||
|
||||
/// <summary>
|
||||
/// Opens the registry key where the switches are stored and returns null if there is an issue opening the key
|
||||
/// </summary>
|
||||
private static RegistryKey OpenRegKeyNoThrow()
|
||||
{
|
||||
try
|
||||
{
|
||||
return Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework\AppContext");
|
||||
}
|
||||
catch { return null; }
|
||||
}
|
||||
}
|
||||
}
|
169
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.cs
vendored
Normal file
169
external/referencesource/mscorlib/system/AppContext/AppContextDefaultValues.cs
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System
|
||||
{
|
||||
internal static partial class AppContextDefaultValues
|
||||
{
|
||||
public static void PopulateDefaultValues()
|
||||
{
|
||||
string platformIdentifier, profile;
|
||||
int version;
|
||||
|
||||
ParseTargetFrameworkName(out platformIdentifier, out profile, out version);
|
||||
|
||||
// Call into each library to populate their default switches
|
||||
PopulateDefaultValuesPartial(platformIdentifier, profile, version);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We have this separate method for getting the parsed elements out of the TargetFrameworkName so we can
|
||||
/// more easily support this on other platforms.
|
||||
/// </summary>
|
||||
private static void ParseTargetFrameworkName(out string identifier, out string profile, out int version)
|
||||
{
|
||||
string targetFrameworkMoniker = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
|
||||
|
||||
// If we don't have a TFM then we should default to the 4.0 behavior where all quirks are turned on.
|
||||
if (!TryParseFrameworkName(targetFrameworkMoniker, out identifier, out version, out profile))
|
||||
{
|
||||
#if FEATURE_CORECLR
|
||||
if (CompatibilitySwitches.UseLatestBehaviorWhenTFMNotSpecified)
|
||||
{
|
||||
// If we want to use the latest behavior it is enough to set the value of the switch to string.Empty.
|
||||
// When the get to the caller of this method (PopulateDefaultValuesPartial) we are going to use the
|
||||
// identifier we just set to decide which switches to turn on. By having an empty string as the
|
||||
// identifier we are simply saying -- don't turn on any switches, and we are going to get the latest
|
||||
// behavior for all the switches
|
||||
identifier = string.Empty;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
identifier = ".NETFramework";
|
||||
version = 40000;
|
||||
profile = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This code was a constructor copied from the FrameworkName class, which is located in System.dll.
|
||||
// Parses strings in the following format: "<identifier>, Version=[v|V]<version>, Profile=<profile>"
|
||||
// - The identifier and version is required, profile is optional
|
||||
// - Only three components are allowed.
|
||||
// - The version string must be in the System.Version format; an optional "v" or "V" prefix is allowed
|
||||
private static bool TryParseFrameworkName(String frameworkName, out String identifier, out int version, out String profile)
|
||||
{
|
||||
// For parsing a target Framework moniker, from the FrameworkName class
|
||||
const char c_componentSeparator = ',';
|
||||
const char c_keyValueSeparator = '=';
|
||||
const char c_versionValuePrefix = 'v';
|
||||
const String c_versionKey = "Version";
|
||||
const String c_profileKey = "Profile";
|
||||
|
||||
identifier = profile = string.Empty;
|
||||
version = 0;
|
||||
|
||||
if (frameworkName == null || frameworkName.Length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
String[] components = frameworkName.Split(c_componentSeparator);
|
||||
version = 0;
|
||||
|
||||
// Identifer and Version are required, Profile is optional.
|
||||
if (components.Length < 2 || components.Length > 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// 1) Parse the "Identifier", which must come first. Trim any whitespace
|
||||
//
|
||||
identifier = components[0].Trim();
|
||||
|
||||
if (identifier.Length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool versionFound = false;
|
||||
profile = null;
|
||||
|
||||
//
|
||||
// The required "Version" and optional "Profile" component can be in any order
|
||||
//
|
||||
for (int i = 1; i < components.Length; i++)
|
||||
{
|
||||
// Get the key/value pair separated by '='
|
||||
string[] keyValuePair = components[i].Split(c_keyValueSeparator);
|
||||
|
||||
if (keyValuePair.Length != 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the key and value, trimming any whitespace
|
||||
string key = keyValuePair[0].Trim();
|
||||
string value = keyValuePair[1].Trim();
|
||||
|
||||
//
|
||||
// 2) Parse the required "Version" key value
|
||||
//
|
||||
if (key.Equals(c_versionKey, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
versionFound = true;
|
||||
|
||||
// Allow the version to include a 'v' or 'V' prefix...
|
||||
if (value.Length > 0 && (value[0] == c_versionValuePrefix || value[0] == 'V'))
|
||||
{
|
||||
value = value.Substring(1);
|
||||
}
|
||||
Version realVersion = new Version(value);
|
||||
// The version class will represent some unset values as -1 internally (instead of 0).
|
||||
version = realVersion.Major * 10000;
|
||||
if (realVersion.Minor > 0)
|
||||
version += realVersion.Minor * 100;
|
||||
if (realVersion.Build > 0)
|
||||
version += realVersion.Build;
|
||||
}
|
||||
//
|
||||
// 3) Parse the optional "Profile" key value
|
||||
//
|
||||
else if (key.Equals(c_profileKey, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(value))
|
||||
{
|
||||
profile = value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!versionFound)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// This is a partial method. Platforms (such as Desktop) can provide an implementation of it that will read override value
|
||||
// from whatever mechanism is available on that platform. If no implementation is provided, the compiler is going to remove the calls
|
||||
// to it from the code
|
||||
static partial void TryGetSwitchOverridePartial(string switchName, ref bool overrideFound, ref bool overrideValue);
|
||||
|
||||
/// This is a partial method. This method is responsible for populating the default values based on a TFM.
|
||||
/// It is partial because each library should define this method in their code to contain their defaults.
|
||||
static partial void PopulateDefaultValuesPartial(string platformIdentifier, string profile, int version);
|
||||
}
|
||||
}
|
82
external/referencesource/mscorlib/system/AppContext/AppContextSwitches.cs
vendored
Normal file
82
external/referencesource/mscorlib/system/AppContext/AppContextSwitches.cs
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
|
||||
namespace System
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
internal static class AppContextSwitches
|
||||
{
|
||||
private static int _noAsyncCurrentCulture;
|
||||
public static bool NoAsyncCurrentCulture
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return GetCachedSwitchValue(AppContextDefaultValues.SwitchNoAsyncCurrentCulture, ref _noAsyncCurrentCulture);
|
||||
}
|
||||
}
|
||||
|
||||
private static int _throwExceptionIfDisposedCancellationTokenSource;
|
||||
public static bool ThrowExceptionIfDisposedCancellationTokenSource
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return GetCachedSwitchValue(AppContextDefaultValues.SwitchThrowExceptionIfDisposedCancellationTokenSource, ref _throwExceptionIfDisposedCancellationTokenSource);
|
||||
}
|
||||
}
|
||||
|
||||
private static int _preserveEventListnerObjectIdentity;
|
||||
public static bool PreserveEventListnerObjectIdentity
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
return GetCachedSwitchValue(AppContextDefaultValues.SwitchPreserveEventListnerObjectIdentity, ref _preserveEventListnerObjectIdentity);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Implementation details
|
||||
//
|
||||
|
||||
private static bool DisableCaching { get; set; }
|
||||
|
||||
static AppContextSwitches()
|
||||
{
|
||||
bool isEnabled;
|
||||
if (AppContext.TryGetSwitch(@"TestSwitch.LocalAppContext.DisableCaching", out isEnabled))
|
||||
{
|
||||
DisableCaching = isEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static bool GetCachedSwitchValue(string switchName, ref int switchValue)
|
||||
{
|
||||
if (switchValue < 0) return false;
|
||||
if (switchValue > 0) return true;
|
||||
|
||||
return GetCachedSwitchValueInternal(switchName, ref switchValue);
|
||||
}
|
||||
|
||||
private static bool GetCachedSwitchValueInternal(string switchName, ref int switchValue)
|
||||
{
|
||||
bool isSwitchEnabled;
|
||||
AppContext.TryGetSwitch(switchName, out isSwitchEnabled);
|
||||
|
||||
if (DisableCaching)
|
||||
{
|
||||
return isSwitchEnabled;
|
||||
}
|
||||
|
||||
switchValue = isSwitchEnabled ? 1 /*true*/ : -1 /*false*/;
|
||||
return isSwitchEnabled;
|
||||
}
|
||||
}
|
||||
}
|
1431
external/referencesource/mscorlib/system/AppDomainSetup.cs
vendored
Normal file
1431
external/referencesource/mscorlib/system/AppDomainSetup.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
82
external/referencesource/mscorlib/system/FormattableString.cs
vendored
Normal file
82
external/referencesource/mscorlib/system/FormattableString.cs
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
/*============================================================
|
||||
**
|
||||
** Class: FormattableString
|
||||
**
|
||||
**
|
||||
** Purpose: implementation of the FormattableString
|
||||
** class.
|
||||
**
|
||||
===========================================================*/
|
||||
namespace System
|
||||
{
|
||||
/// <summary>
|
||||
/// A composite format string along with the arguments to be formatted. An instance of this
|
||||
/// type may result from the use of the C# or VB language primitive "interpolated string".
|
||||
/// </summary>
|
||||
public abstract class FormattableString : IFormattable
|
||||
{
|
||||
/// <summary>
|
||||
/// The composite format string.
|
||||
/// </summary>
|
||||
public abstract string Format { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns an object array that contains zero or more objects to format. Clients should not
|
||||
/// mutate the contents of the array.
|
||||
/// </summary>
|
||||
public abstract object[] GetArguments();
|
||||
|
||||
/// <summary>
|
||||
/// The number of arguments to be formatted.
|
||||
/// </summary>
|
||||
public abstract int ArgumentCount { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns one argument to be formatted from argument position <paramref name="index"/>.
|
||||
/// </summary>
|
||||
public abstract object GetArgument(int index);
|
||||
|
||||
/// <summary>
|
||||
/// Format to a string using the given culture.
|
||||
/// </summary>
|
||||
public abstract string ToString(IFormatProvider formatProvider);
|
||||
|
||||
string IFormattable.ToString(string ignored, IFormatProvider formatProvider)
|
||||
{
|
||||
return ToString(formatProvider);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Format the given object in the invariant culture. This static method may be
|
||||
/// imported in C# by
|
||||
/// <code>
|
||||
/// using static System.FormattableString;
|
||||
/// </code>.
|
||||
/// Within the scope
|
||||
/// of that import directive an interpolated string may be formatted in the
|
||||
/// invariant culture by writing, for example,
|
||||
/// <code>
|
||||
/// Invariant($"{{ lat = {latitude}; lon = {longitude} }}")
|
||||
/// </code>
|
||||
/// </summary>
|
||||
public static string Invariant(FormattableString formattable)
|
||||
{
|
||||
if (formattable == null)
|
||||
{
|
||||
throw new ArgumentNullException("formattable");
|
||||
}
|
||||
|
||||
return formattable.ToString(Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return ToString(Globalization.CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
@@ -51,7 +51,7 @@ namespace System
|
||||
/// </remarks>
|
||||
[Serializable]
|
||||
[ComVisible(false)]
|
||||
#if !FEATURE_CORECLR && !FEATURE_NETCORE
|
||||
#if !FEATURE_CORECLR
|
||||
[HostProtection(Synchronization = true, ExternalThreading = true)]
|
||||
#endif
|
||||
[DebuggerTypeProxy(typeof(System_LazyDebugView<>))]
|
||||
@@ -283,9 +283,6 @@ namespace System
|
||||
/// </remarks>
|
||||
public bool IsValueCreated
|
||||
{
|
||||
#if !FEATURE_CORECLR
|
||||
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
|
||||
#endif
|
||||
get
|
||||
{
|
||||
return m_boxed != null && m_boxed is Boxed;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// ==--==
|
||||
// <OWNER>[....]</OWNER>
|
||||
// <OWNER>jfree</OWNER>
|
||||
//
|
||||
|
||||
namespace System {
|
||||
|
@@ -31,8 +31,7 @@ namespace System {
|
||||
using AssemblyHashAlgorithm = System.Configuration.Assemblies.AssemblyHashAlgorithm;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics.Tracing;
|
||||
|
||||
|
||||
// Only statics, does not need to be marked with the serializable attribute
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComDefaultInterface(typeof(_Activator))]
|
||||
@@ -110,12 +109,6 @@ namespace System {
|
||||
|
||||
static public Object CreateInstance(Type type, params Object[] args)
|
||||
{
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage) && type != null)
|
||||
{
|
||||
FrameworkEventSource.Log.ActivatorCreateInstance(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
return CreateInstance(type,
|
||||
Activator.ConstructorDefault,
|
||||
null,
|
||||
@@ -138,12 +131,6 @@ namespace System {
|
||||
|
||||
static public Object CreateInstance(Type type)
|
||||
{
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage) && type != null)
|
||||
{
|
||||
FrameworkEventSource.Log.ActivatorCreateInstance(type.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
return Activator.CreateInstance(type, false);
|
||||
}
|
||||
|
||||
@@ -218,12 +205,7 @@ namespace System {
|
||||
static public T CreateInstance<T>()
|
||||
{
|
||||
RuntimeType rt = typeof(T) as RuntimeType;
|
||||
#if !FEATURE_CORECLR && !MONO
|
||||
if (FrameworkEventSource.IsInitialized && FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.DynamicTypeUsage) && rt != null)
|
||||
{
|
||||
FrameworkEventSource.Log.ActivatorCreateInstanceT(rt.GetFullNameForEtw());
|
||||
}
|
||||
#endif
|
||||
|
||||
// This is a hack to maintain compatibility with V2. Without this we would throw a NotSupportedException for void[].
|
||||
// Array, Ref, and Pointer types don't have default constructors.
|
||||
if (rt.HasElementType)
|
||||
@@ -629,6 +611,7 @@ namespace System {
|
||||
#if FEATURE_COMINTEROP || MONO_COM || MOBILE_LEGACY
|
||||
|
||||
#if FEATURE_CLICKONCE || MOBILE_LEGACY
|
||||
#if FEATURE_CLICKONCE || MONO_FEATURE_MULTIPLE_APPDOMAINS
|
||||
[System.Security.SecuritySafeCritical] // auto-generated
|
||||
public static ObjectHandle CreateInstance (ActivationContext activationContext) {
|
||||
AppDomainManager domainManager = AppDomain.CurrentDomain.DomainManager;
|
||||
@@ -646,6 +629,17 @@ namespace System {
|
||||
|
||||
return domainManager.ApplicationActivator.CreateInstance(activationContext, activationCustomData);
|
||||
}
|
||||
#else
|
||||
[Obsolete ("Activator.CreateInstance (ActivationContext) is not supported on this platform.", true)]
|
||||
public static ObjectHandle CreateInstance (ActivationContext activationContext) {
|
||||
throw new PlatformNotSupportedException ("Activator.CreateInstance (ActivationContext) is not supported on this platform.");
|
||||
}
|
||||
|
||||
[Obsolete ("Activator.CreateInstance (ActivationContext, string[]) is not supported on this platform.", true)]
|
||||
public static ObjectHandle CreateInstance (ActivationContext activationContext, string[] activationCustomData) {
|
||||
throw new PlatformNotSupportedException ("Activator.CreateInstance (ActivationContext) is not supported on this platform.");
|
||||
}
|
||||
#endif
|
||||
#endif // FEATURE_CLICKONCE
|
||||
|
||||
[ResourceExposure(ResourceScope.Machine)]
|
||||
@@ -732,6 +726,7 @@ namespace System {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !FEATURE_CORECLR
|
||||
void _Activator.GetTypeInfoCount(out uint pcTInfo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -753,6 +748,7 @@ namespace System {
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user