\n \n Add missing custom type marshaller members\n Aggiungi membri mancanti del gestore del marshalling di tipi personalizzato mancanti\n \n \n \n Add missing features to the 'CustomTypeMarshallerAttribute' attribute\n Aggiungi funzionalità mancanti all'attributo 'CustomTypeMarshallerAttribute'\n \n \n \n When a constructor taking a 'Span<byte>' is specified on the native type, the type must set the BufferSize field on the 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' to provide the size of the caller-allocated buffer.\n Quando nel tipo nativo è specificato un costruttore che accetta 'Span<byte>', il tipo deve impostare il campo BufferSize in 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' per fornire le dimensioni del buffer allocato dal chiamante.\n \n \n \n The native type '{0}' must set the 'BufferSize' field on the applied 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' to specify the size of the caller-allocated buffer because it has a constructor that takes a caller-allocated 'Span<byte>'\n Il tipo nativo '{0}' deve impostare il campo 'BufferSize' nell'elemento 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' applicato per specificare le dimensioni del buffer allocato dal chiamante, perché contiene un costruttore che accetta un elemento 'Span<byte>' allocato dal chiamante\n \n \n \n 'BufferSize' should be set on 'CustomTypeMarshallerAttribute'\n 'BufferSize' deve essere impostato su 'CustomTypeMarshallerAttribute'\n \n \n \n A type that supports marshalling from managed to native using a caller-allocated buffer should also support marshalling from managed to native where using a caller-allocated buffer is impossible.\n Un tipo che supporta il marshalling da gestito a nativo tramite un buffer allocato dal chiamante deve supportare anche il marshalling da gestito a nativo in cui non è possibile usare un buffer allocato dal chiamante.\n \n \n \n Native type '{0}' has a constructor taking a caller-allocated buffer, but does not support marshalling in scenarios where using a caller-allocated buffer is impossible\n Il tipo nativo '{0}' include un costruttore che accetta un buffer allocato dal chiamante, ma non supporta il marshalling in scenari in cui l'uso di un buffer allocato dal chiamante risulta impossibile\n \n \n \n A marshaller type that provides a constructor taking a caller-allocated 'Span<byte>' should specify that it supports the 'CallerAllocatedBuffer' feature.\n Un tipo di gestore del marshalling che fornisce un costruttore che accetta un elemento 'Span<byte>' allocato dal chiamante deve specificare che supporta la funzionalità 'CallerAllocatedBuffer'.\n \n \n \n The type '{0}' provides a constructor taking a caller-allocated 'Span<byte>' but does not specify that it supports the 'CallerAllocatedBuffer' feature. The constructor will not be used unless the feature is specified.\n Il tipo '{0}' fornisce un costruttore che accetta un elemento 'Span<byte>' allocato dal chiamante, ma non specifica che supporta la funzionalità 'CallerAllocatedBuffer'. Il costruttore verrà usato solo se è specificata la funzionalità.\n \n \n \n The generated 'DllImportAttribute' will not have a value corresponding to '{0}'.\n L'elemento 'DllImportAttribute' generato non avrà un valore corrispondente a '{0}'.\n \n \n \n '{0}' has no equivalent in 'DllImportAtttribute' and will not be forwarded\n '{0}' non ha equivalenti in 'DllImportAtttribute' e non verrà inoltrato\n \n \n \n Specified 'LibraryImportAttribute' arguments cannot be forwarded to 'DllImportAttribute'\n Gli argomenti 'LibraryImportAttribute' specificati non possono essere inoltrati a 'DllImportAttribute'\n \n \n \n Source-generated P/Invokes will ignore any configuration that is not supported.\n I P/Invoke generati dall'origine ignoreranno qualsiasi configurazione non supportata.\n \n \n \n The '{0}' configuration is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular `DllImport` instead.\n La configurazione '{0}' non è supportata dai P/Invoke generati dall'origine. Se la configurazione specificata è obbligatoria, usare un attributo `DllImport` normale.\n \n \n \n The specified marshalling configuration is not supported by source-generated P/Invokes. {0}.\n La configurazione di marshalling specificata non è supportata dai P/Invoke generati dall'origine. {0}.\n \n \n \n The specified '{0}' configuration for parameter '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular `DllImport` instead.\n La configurazione '{0}' specificata per il parametro '{1}' non è supportata dai P/Invoke generati dall'origine. Se la configurazione specificata è obbligatoria, usare un attributo `DllImport` normale.\n \n \n \n The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular `DllImport` instead.\n La configurazione '{0}' specificata per il valore restituito del metodo '{1}' non è supportata dai P/Invoke generati dall'origine. Se la configurazione specificata è obbligatoria, usare un attributo `DllImport` normale.\n \n \n \n The specified value '{0}' for '{1}' is not supported by source-generated P/Invokes. If the specified value is required, use a regular `DllImport` instead.\n Il valore specificato '{0}' per '{1}' non è supportato da P/Invoke generati dall'origine. Se il valore specificato è obbligatorio, usare un 'DllImport' normale.\n \n \n \n Specified configuration is not supported by source-generated P/Invokes.\n La configurazione specificata non è supportata dai P/Invoke generati dall'origine.\n \n \n \n Only one of 'ConstantElementCount' or 'ElementCountInfo' may be used in a 'MarshalUsingAttribute' for a given 'ElementIndirectionDepth'\n In un elemento 'MarshalUsingAttribute' per un elemento 'ElementIndirectionDepth' specificato è possibile usare solo uno dei valori 'ConstantElementCount' o 'ElementCountInfo'\n \n \n \n Automatically converting a P/Invoke with 'PreserveSig' set to 'false' to a source-generated P/Invoke may produce invalid code\n La conversione automatica di un P/Invoke con 'PreserveSig' impostato su 'false' in un P/Invoke generato dall'origine può produrre codice non valido\n \n \n \n Convert to 'LibraryImport'\n Converti in 'LibraryImport'\n \n \n \n Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time\n Usare 'LibraryImportAttribute' invece di 'DllImportAttribute' per generare codice di marshalling di P/Invoke in fase di compilazione\n \n \n \n Mark the method '{0}' with 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time\n Contrassegnare il metodo '{0}' con 'LibraryImportAttribute' invece di 'DllImportAttribute' per generare codice di marshalling di P/Invoke in fase di compilazione\n \n \n \n Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time\n Usare 'LibraryImportAttribute' invece di 'DllImportAttribute' per generare codice di marshalling di P/Invoke in fase di compilazione\n \n \n \n Conversion to 'LibraryImport' may change behavior and compatibility. See {0} for more information.\n La conversione in 'LibraryImport' può modificare il comportamento e la compatibilità. Per altre informazioni, vedere {0}.\n {0} is a documentation link\n \n \n Convert to 'LibraryImport' with '{0}' suffix\n Converti in 'LibraryImport' con il suffisso '{0}'\n \n \n \n Marshaller type does not have the required shape\n Il tipo di marshaller non ha la forma richiesta\n \n \n \n A native must set the 'Direction' property on the 'CustomTypeMarshallerAttribute' to a value that sets at least one known flag value on the 'CustomTypeMarshallerDirection' enum\n Un tipo nativo deve impostare la proprietà 'Direction' in 'CustomTypeMarshallerAttribute' su un valore che imposta almeno un valore di flag noto nell'enumerazione 'CustomTypeMarshallerDirection'\n \n \n \n The native type '{0}' must set the 'Direction' property on the 'CustomTypeMarshallerAttribute' to a value that sets at least one known flag value on the 'CustomTypeMarshallerDirection' enum\n Il tipo nativo '{0}' deve impostare la proprietà 'Direction' in 'CustomTypeMarshallerAttribute' su un valore che imposta almeno un valore di flag noto nell'enumerazione 'CustomTypeMarshallerDirection'\n \n \n \n The 'CustomTypeMarshallerAttribute' attribute must be semantically valid\n L'attributo 'CustomTypeMarshallerAttribute' deve essere semanticamente valido\n \n \n \n The 'CustomTypeMarshallerAttribute' on '{0}' is semantically invalid\n 'CustomTypeMarshallerAttribute' in '{0}' non è semanticamente valido\n \n \n \n The specified parameter needs to be marshalled from managed to native, but the native type '{0}' does not support it.\n È necessario effettuare il marshalling del parametro specificato da gestito a nativo, ma il tipo nativo '{0}' non lo supporta.\n \n \n \n The specified parameter needs to be marshalled from native to managed, but the native type '{0}' does not support it.\n È necessario effettuare il marshalling del parametro specificato da nativo a gestito, ma il tipo nativo '{0}' non lo supporta.\n \n \n \n A marshaller type that provides a 'FreeNative' method should specify that it supports the 'UnmanagedResources' feature.\n Un tipo di gestore del marshalling che fornisce un metodo 'FreeNative' deve specificare che supporta la funzionalità 'UnmanagedResources'.\n \n \n \n The type '{0}' provides a 'FreeNative' method but does not specify that it supports the 'UnmanagedResources' feature. The method will not be used unless the feature is specified.\n Il tipo '{0}' fornisce un metodo 'FreeNative', ma non specifica che supporta la funzionalità 'UnmanagedResources'. Il metodo verrà usato solo se è specificata la funzionalità.\n \n \n \n A marshaller type that provides a 'FromNativeValue' method should specify that it supports the 'TwoStageMarshalling' feature.\n Un tipo di gestore del marshalling che fornisce un metodo 'FromNativeValue' deve specificare che supporta la funzionalità 'TwoStageMarshalling'.\n \n \n \n The type '{0}' provides a 'FromNativeValue' method but does not specify that it supports the 'TwoStageMarshalling' feature. The method will not be used unless the feature is specified.\n Il tipo '{0}' fornisce un metodo 'FromNativeValue', ma non specifica che supporta la funzionalità 'TwoStageMarshalling'. Il metodo verrà usato solo se è specificata la funzionalità.\n \n \n \n The return type of 'GetPinnableReference' (after accounting for 'ref') must be blittable.\n Il tipo restituito di 'GetPinnableReference' (dopo l'accounting di 'ref') deve essere copiabile da BLT.\n \n \n \n The dereferenced type of the return type of the 'GetPinnableReference' method must be blittable\n Il tipo dereferenziato del tipo restituito del metodo 'GetPinnableReference' deve essere copiabile da BLT\n \n \n \n A type that supports marshalling from managed to native by pinning should also support marshalling from managed to native where pinning is impossible.\n Un tipo che supporta il marshalling da gestito a nativo tramite l'aggiunta deve supportare anche il marshalling da gestito a nativo nei casi in cui l'aggiunta risulta impossibile.\n \n \n \n Type '{0}' has a 'GetPinnableReference' method but its native type does not support marshalling in scenarios where pinning is impossible\n Il tipo '{0}' include un metodo 'GetPinnableReference', ma il relativo tipo nativo non supporta il marshalling in scenari in cui l'aggiunta risulta impossibile\n \n \n \n The 'TwoStageMarshalling' feature requires a 'TNativeType ToNativeValue()' method for the 'In' direction.\n La funzionalità 'TwoStageMarshalling' richiede un metodo 'TNativeType ToNativeValue()' per la direzione 'In'.\n \n \n \n A marshaller type '{0}' that supports marshalling in the 'In' direction with the 'TwoStageMarshalling' feature must provide a 'ToNativeValue' instance method that returns the native value\n Un tipo di marshaller '{0}' che supporta il marshalling nella direzione 'In' con la funzionalità 'TwoStageMarshalling' deve fornire un metodo di istanza 'ToNativeValue' che restituisce il valore nativo\n \n \n \n Method '{0}' is contained in a type '{1}' that is not marked 'partial'. P/Invoke source generation will ignore method '{0}'.\n Il metodo '{0}' è contenuto in un tipo '{1}' non contrassegnato come 'partial'. Durante la generazione dell'origine P/Invoke il metodo '{0}' verrà ignorato.\n \n \n \n Methods marked with 'LibraryImportAttribute' should be 'static', 'partial', and non-generic. P/Invoke source generation will ignore methods that are non-'static', non-'partial', or generic.\n I metodi contrassegnati con 'LibraryImportAttribute' devono essere 'static', 'partial' e non generici. Durante la generazione dell'origine P/Invoke i metodi non 'static', non 'partial' o generici verranno ignorati.\n \n \n \n Method '{0}' should be 'static', 'partial', and non-generic when marked with 'LibraryImportAttribute'. P/Invoke source generation will ignore method '{0}'.\n Il metodo '{0}' deve essere 'static', 'partial' e non generico quando è contrassegnato con 'LibraryImportAttribute'. Durante la generazione dell'origine P/Invoke il metodo '{0}' verrà ignorato.\n \n \n \n Invalid `CustomTypeMarshallerAttribute` usage\n Utilizzo di 'CustomTypeMarshallerAttribute' non valido\n \n \n \n Invalid 'LibraryImportAttribute' usage\n Utilizzo di 'LibraryImportAttribute' non valido\n \n \n \n Specified native type is invalid\n Il tipo nativo specificato non è valido\n \n \n \n Marshaller type has incompatible method signatures\n Il tipo marshaller ha firme di metodo incompatibili\n \n \n \n The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.\n La configurazione di 'StringMarshalling' e 'StringMarshallingCustomType' non è valida.\n \n \n \n The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on method '{0}' is invalid. {1}\n La configurazione di 'StringMarshalling' e 'StringMarshallingCustomType' nel metodo '{0}' non è valida. {1}\n {1} is a message containing additional details about what is not valid\n \n \n 'StringMarshallingCustomType' must be specified when 'StringMarshalling' is set to 'StringMarshalling.Custom'.\n È necessario specificare 'StringMarshallingCustomType' quando 'StringMarshalling' è impostato su 'StringMarshalling.Custom'.\n \n \n \n 'StringMarshalling' should be set to 'StringMarshalling.Custom' when 'StringMarshallingCustomType' is specified.\n 'StringMarshalling' deve essere impostato su 'StringMarshalling.Custom' quando è specificato 'StringMarshallingCustomType'.\n \n \n \n The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'.\n Il tipo di elemento di 'ReadOnlySpan' restituito da 'GetManagedValuesSource' deve essere uguale al tipo di elemento restituito da 'GetManagedValuesDestination'.\n \n \n \n The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'\n Il tipo di elemento di 'ReadOnlySpan' restituito da 'GetManagedValuesSource' deve essere uguale al tipo di elemento restituito da 'GetManagedValuesDestination'\n \n \n \n A 'LinearCollection'-kind native type that supports the 'CallerAllocatedBuffer' feature must provide a three-parameter constructor taking the managed type as the first parameter, a 'Span<byte>' as the second parameter, and the native size of the element as the third parameter\n Un tipo nativo di tipo 'LinearCollection' che supporta la funzionalità 'CallerAllocatedBuffer' deve fornire un costruttore a tre parametri che accetta il tipo gestito come primo parametro, un elemento 'Span<byte>' come secondo parametro e la dimensione nativa dell'elemento come terzo parametro\n \n \n \n The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a three-parameter constructor that takes a '{1}' , a 'Span<byte>', and an 'int'\n Il tipo '{0}' specifica che supporta il marshalling 'In' con la funzionalità 'CallerAllocatedBuffer' per '{1}', ma non fornisce un costruttore a tre parametri che accetta '{1}', 'Span<byte>' e 'int'\n \n \n \n A 'LinearCollection'-kind native type that supports marshalling in the 'In' direction must provide a 'GetManagedValuesSource' that returns a 'ReadOnlySpan<>' and a 'GetNativeValuesDestination' method that returns a 'Span<byte>'.\n Il tipo nativo di tipo 'LinearCollection' che supporta il marshalling nella direzione 'In' deve fornire un elemento 'GetManagedValuesSource' che restituisce un elemento 'ReadOnlySpan<>' e un metodo 'GetNativeValuesDestination' che restituisce un elemento 'Span<byte>'.\n \n \n \n The type '{0}' specifies that is supports marshalling in the 'In' direction, but it does not provide a 'GetManagedValuesSource' that returns a 'ReadOnlySpan<>' and a 'GetNativeValuesDestination' method that returns a 'Span<byte>'\n Il tipo '{0}' specifica che supporta il marshalling nella direzione 'In', ma non fornisce un elemento 'GetManagedValuesSource' che restituisce un elemento 'ReadOnlySpan<>' e un metodo 'GetNativeValuesDestination' che restituisce un elemento 'Span<byte>'\n \n \n \n A 'LinearCollection'-kind native type must provide a two-parameter constructor taking the managed type as the first parameter and the native size of the element as the second parameter\n Un tipo nativo di tipo 'LinearCollection' deve fornire un costruttore a due parametri che accetta il tipo gestito come primo parametro e le dimensioni native dell'elemento come secondo parametro\n \n \n \n The type '{0}' specifies that it supports 'In' marshalling of '{1}' but does not provide a two-parameter constructor that takes a '{1}' as the first parameter and an 'int' as the second parameter\n Il tipo '{0}' specifica che supporta il marshalling 'In' di '{1}' ma non fornisce un costruttore a due parametri che accetta '{1}' come primo parametro e 'int' come secondo parametro\n \n \n \n A 'LinearCollection'-kind native type that supports marshalling in the 'Out' direction must provide a 'GetManagedValuesDestination' that takes an 'int' and returns a 'Span<>' and a 'GetNativeValuesSource' method that takes an 'int' and rreturns a 'ReadOnlySpan<byte>'.\n Un tipo nativo di tipo 'LinearCollection' che supporta il marshalling nella direzione 'Out' deve fornire un metodo 'GetManagedValuesDestination' che accetta 'int' e restituisce un elemento 'Span<>' e un metodo 'GetNativeValuesSource' che accetta 'int' e restituisce un elemento 'ReadOnlySpan<byte>'.\n \n \n \n The type '{0}' specifies that it supports marshalling in the 'Out' direction, but it does not provide a 'GetManagedValuesDestination' that takes an 'int' and returns a 'Span<>' and a 'GetNativeValuesSource' method that takes an 'int' and rreturns a 'ReadOnlySpan<byte>'\n Il tipo '{0}' specifica che supporta il marshalling nella direzione 'Out', ma non fornisce un metodo 'GetManagedValuesDestination' che accetta 'int' e restituisce un elemento 'Span<>' e un metodo 'GetNativeValuesSource' che accetta 'int' e restituisce un elemento 'ReadOnlySpan<byte>'\n \n \n \n A 'LinearCollection'-kind native type that supports marshalling in the 'Out' direction must provide a constructor that takes the size of the native element as an 'int'.\n Un tipo nativo di tipo 'LinearCollection' che supporta il marshalling nella direzione 'Out' deve fornire un costruttore che accetta le dimensioni dell'elemento nativo come 'int'.\n \n \n \n The type '{0}' specifies that it supports marshalling in the 'Out' direction, but it does not provide a constructor that takes the size of the native element as an 'int'.\n Il tipo '{0}' specifica che supporta il marshalling nella direzione 'Out', ma non fornisce un costruttore che accetta le dimensioni dell'elemento nativo come 'int'.\n \n \n \n The specified marshaller direction must be a valid value of the 'System.Runtime.InteropServices.CustomMarshallerDirection' enum.\n La direzione del gestore del marshalling specificato deve essere un valore valido dell'enumerazione 'System.Runtime.InteropServices.CustomMarshallerDirection'.\n \n \n \n The specified custom marshaller direction for '{0}' is invalid\n La direzione del gestore del marshalling personalizzato specificata per '{0}' non è valida\n \n \n \n The use cases for 'GetPinnableReference' are not applicable in any scenarios where 'TwoStageMarshalling' is not also required.\n I casi d'uso per 'GetPinnableReference' non sono applicabili in nessuno scenario in cui non è richiesto anche 'TwoStageMarshalling'.\n \n \n \n The 'GetPinnableReference' method cannot be provided on the native type '{0}' unless the 'TwoStageMarshalling' feature is also supported\n Non è possibile specificare il metodo 'GetPinnableReference' nel tipo nativo '{0}' a meno che non sia supportata anche la funzionalità 'TwoStageMarshalling'\n \n \n \n The specified marshaller kind must be a valid value of the 'System.Runtime.InteropServices.CustomMarshallerKind' enum.\n Il tipo di gestore del marshalling specificato deve essere un valore valido dell'enumerazione 'System.Runtime.InteropServices.CustomMarshallerKind'.\n \n \n \n The specified custom marshaller kind for '{0}' is invalid\n Il tipo del gestore del marshalling personalizzato specificata per '{0}' non è valida\n \n \n \n A type with a 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' must specify a managed type\n Un tipo con 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' deve specificare un tipo gestito\n \n \n \n The type '{0}' does not specify a managed type in the 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' applied to the type\n Il tipo '{0}' non specifica un tipo gestito nell'elemento 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' applicato al tipo\n \n \n \n Marshaller type does not support allocating constructor\n Il tipo marshaller non supporta l'allocazione del costruttore\n \n \n \n The native type '{0}' must be a closed generic or have the same number of generic parameters as the managed type so the emitted code can use a specific instantiation.\n Il tipo nativo '{0}' deve essere un generico chiuso o avere lo stesso numero di parametri generici del tipo gestito in modo che il codice emesso possa usare una creazione di istanza specifica.\n \n \n \n The native type '{0}' for managed type '{1}' must be a closed generic type or have the same arity as the managed type.\n Il tipo nativo '{0}' per il tipo gestito '{1}' deve essere un tipo generico chiuso o avere lo stesso grado del tipo gestito.\n \n \n \n A native type must be blittable.\n Un tipo nativo deve essere copiabile da BLT.\n \n \n \n The native type '{0}' for type '{1}' must be blittable\n Il tipo nativo '{0}' per il tipo '{1}' deve essere copiabile da BLT\n \n \n \n The native type must be pointer sized so the pinned result of 'GetPinnableReference' can be cast to the native type.\n Il tipo nativo deve essere dimensionato in base al puntatore in modo da poter eseguire il cast del risultato aggiunto di 'GetPinnableReference' al tipo nativo.\n \n \n \n The native type '{0}' must be pointer sized because the managed type '{1}' has a 'GetPinnableReference' method\n Il tipo nativo '{0}' deve essere dimensionato in base al puntatore perché il tipo gestito '{1}' include un metodo 'GetPinnableReference'\n \n \n \n A native type for a given type must have the 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' that specifies this type as the managed type.\n Un tipo nativo per un tipo specificato deve includere un elemento 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' che specifica questo tipo come tipo gestito.\n \n \n \n The native type for the type '{0}' must be a type with the 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' that specifies this type as the managed type\n Il tipo nativo per il tipo '{0}' deve essere un tipo con 'System.Runtime.InteropServices.CustomTypeMarshallerAttribute' che specifica questo tipo come tipo gestito\n \n \n \n A 'Value' or 'LinearCollection'-kind native type that supports marshalling in the 'Out' direction must provide a 'ToManaged' method that returns the managed type.\n Un tipo nativo di tipo 'Value' o 'LinearCollection' che supporta il marshalling nella direzione 'Out' deve fornire un metodo 'ToManaged' che restituisce il tipo gestito.\n \n \n \n The type '{0}' specifies it supports marshalling in the 'Out' direction, but it does not provide a 'ToManaged' method that returns the managed type\n Il tipo '{0}' specifica che supporta il marshalling nella direzione 'Out', ma non fornisce un metodo 'ToManaged' che restituisce il tipo gestito\n \n \n \n The 'TwoStageMarshalling' feature requires a 'void FromNativeValue(TNativeType value)' method for the 'Out' direction.\n Con la funzionalità 'TwoStageMarshalling' è richiesto un metodo 'void FromNativeValue(TNativeType value)' per la direzione 'Out'.\n \n \n \n The marshaller type '{0}' supports marshalling in the 'Out' direction with the 'TwoStageMarshalling' feature, but it does not provide a 'FromNativeValue' instance method that returns 'void' and takes one parameter.\n Il tipo di gestore del marshalling '{0}' supporta il marshalling nella direzione 'Out' con la funzionalità 'TwoStageMarshalling', ma non fornisce un metodo di istanza 'FromNativeValue' che restituisce 'void' e accetta un solo parametro.\n \n \n \n Marshaller type defines a well-known method without specifying support for the corresponding feature\n Il tipo marshaller definisce un metodo noto senza specificare il supporto per la funzionalità corrispondente\n \n \n \n The 'Value' property must not be a 'ref' or 'readonly ref' property.\n La proprietà 'Value' non deve essere una proprietà 'ref' o 'readonly ref'.\n \n \n \n The 'Value' property on the native type '{0}' must not be a 'ref' or 'readonly ref' property.\n La proprietà 'Value' nel tipo nativo '{0}' non deve essere una proprietà 'ref' o 'readonly ref'.\n \n \n \n An abstract type derived from 'SafeHandle' cannot be marshalled by reference. The provided type must be concrete.\n Non è possibile effettuare il marshalling per riferimento di un tipo astratto derivato da 'SafeHandle'. Il tipo specificato deve essere concreto.\n \n \n \n A marshaller type that provides a 'ToNativeValue' method should specify that it supports the 'TwoStageMarshalling' feature.\n Un tipo di gestore del marshalling che fornisce un metodo 'ToNativeValue' deve specificare che supporta la funzionalità 'TwoStageMarshalling'.\n \n \n \n The type '{0}' provides a 'ToNativeValue' method but does not specify that it supports the 'TwoStageMarshalling' feature. The method will not be used unless the feature is specified.\n Il tipo '{0}' fornisce un metodo 'ToNativeValue', ma non specifica che supporta la funzionalità 'TwoStageMarshalling'. Il metodo verrà usato solo se è specificata la funzionalità.\n \n \n \n The return type of 'ToNativeValue' and the parameter type of 'FromNativeValue' must be the same.\n Il tipo restituito di 'ToNativeValue' e il tipo di parametro di 'FromNativeValue' devono essere uguali.\n \n \n \n The return type of 'ToNativeValue' and the parameter type of 'FromNativeValue' must be the same\n Il tipo restituito di 'ToNativeValue' e il tipo di parametro di 'FromNativeValue' devono essere uguali\n \n \n \n For types that are not supported by source-generated P/Invokes, the resulting P/Invoke will rely on the underlying runtime to marshal the specified type.\n Per i tipi non supportati da P/Invoke generati dall'origine, il P/Invoke risultante si baserà sul runtime sottostante per effettuare il marshalling del tipo specificato.\n \n \n \n The type '{0}' is not supported by source-generated P/Invokes. The generated source will not handle marshalling of parameter '{1}'.\n Il tipo '{0}' non è supportato dai P/Invoke generati dall'origine. L'origine generata non gestirà il marshalling del parametro '{1}'.\n \n \n \n {0} The generated source will not handle marshalling of parameter '{1}'.\n {0} L'origine generata non gestirà il marshalling del parametro '{1}'.\n {0} is a message containing additional details about what is not supported\n{1} is the name of the parameter\n \n \n The type '{0}' is not supported by source-generated P/Invokes. The generated source will not handle marshalling of the return value of method '{1}'.\n Il tipo '{0}' non è supportato dai P/Invoke generati dall'origine. L'origine generata non gestirà il marshalling del valore restituito del metodo '{1}'.\n \n \n \n {0} The generated source will not handle marshalling of the return value of method '{1}'.\n {0} L'origine generata non gestirà il marshalling del valore restituito del metodo '{1}'.\n {0} is a message containing additional details about what is not supported\n{1} is the name of the method\n \n \n Specified type is not supported by source-generated P/Invokes\n Il tipo specificato non è supportato dai P/Invoke generati dall'origine\n \n \n \n The 'UnmanagedResources' feature requires a 'void FreeNative()' method.\n Con la funzionalità 'UnmanagedResources' è richiesto un metodo 'void FreeNative()'.\n \n \n \n The marshaller type '{0}' supports marshalling with the 'UnmanagedResources' feature, but it does not provide a parameterless 'FreeNative' instance method that returns 'void'\n Il tipo di gestore del marshalling '{0}' supporta il marshalling con la funzionalità 'UnmanagedResources', ma non fornisce un metodo di istanza 'FreeNative' senza parametri che restituisce 'void'\n \n \n \n A 'Value'-kind native type that supports the 'CallerAllocatedBuffer' feature must provide a two-parameter constructor taking the managed type and a 'Span' of an 'unmanaged' type as parameters\n Un tipo nativo di tipo 'Value' che supporta la funzionalità 'CallerAllocatedBuffer' deve fornire un costruttore a due parametri che accetta il tipo gestito e un 'Span' di un tipo 'non gestito' come parametri\n \n \n \n The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a two-parameter constructor that takes a '{1}' and 'Span' of an 'unmanaged' type as parameters\n The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a two-parameter constructor that takes a '{1}' and 'Span' of an 'unmanaged' type as parameters\n \n \n \n A 'Value'-kind native type must provide a one-parameter constructor taking the managed type as a parameter\n Un tipo nativo di tipo 'Value' deve fornire un costruttore a un parametro che accetta il tipo gestito come parametro\n \n \n \n The type '{0}' specifies that it supports 'In' marshalling of '{1}' but does not provide a one-parameter constructor that takes a '{1}' as a parameter\n Il tipo '{0}' specifica che supporta il marshalling 'In' di '{1}' ma non fornisce un costruttore con un solo parametro che accetta '{1}' come parametro\n \n \n
\n \n"},"label":{"kind":"number","value":-1,"string":"-1"}}},{"rowIdx":2073588,"cells":{"repo_name":{"kind":"string","value":"dotnet/runtime"},"pr_number":{"kind":"number","value":65966,"string":"65,966"},"pr_title":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios"},"pr_description":{"kind":"string","value":"Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"author":{"kind":"string","value":"layomia"},"date_created":{"kind":"timestamp","value":"2022-02-28T18:25:51Z","string":"2022-02-28T18:25:51Z"},"date_merged":{"kind":"timestamp","value":"2022-05-24T22:19:32Z","string":"2022-05-24T22:19:32Z"},"previous_commit":{"kind":"string","value":"c5f949efa20bcb555c453037fa954fcc403f9490"},"pr_commit":{"kind":"string","value":"bfbb78354e536ac616f2f9dabf3db2b8fa8b9f64"},"query":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios. Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"filepath":{"kind":"string","value":"./src/libraries/System.Private.Xml/tests/Xslt/TestFiles/TestData/XsltScenarios/EXslt/datetime-max.xsl"},"before_content":{"kind":"string","value":"\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n "},"after_content":{"kind":"string","value":"\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n "},"label":{"kind":"number","value":-1,"string":"-1"}}},{"rowIdx":2073589,"cells":{"repo_name":{"kind":"string","value":"dotnet/runtime"},"pr_number":{"kind":"number","value":65966,"string":"65,966"},"pr_title":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios"},"pr_description":{"kind":"string","value":"Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"author":{"kind":"string","value":"layomia"},"date_created":{"kind":"timestamp","value":"2022-02-28T18:25:51Z","string":"2022-02-28T18:25:51Z"},"date_merged":{"kind":"timestamp","value":"2022-05-24T22:19:32Z","string":"2022-05-24T22:19:32Z"},"previous_commit":{"kind":"string","value":"c5f949efa20bcb555c453037fa954fcc403f9490"},"pr_commit":{"kind":"string","value":"bfbb78354e536ac616f2f9dabf3db2b8fa8b9f64"},"query":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios. Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"filepath":{"kind":"string","value":"./src/native/corehost/lib_static.cmake"},"before_content":{"kind":"string","value":"# Licensed to the .NET Foundation under one or more agreements.\n# The .NET Foundation licenses this file to you under the MIT license.\n\nproject(lib${DOTNET_PROJECT_NAME})\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/common.cmake)\n\nadd_definitions(-D_NO_ASYNCRTIMP)\nadd_definitions(-D_NO_PPLXIMP)\nadd_definitions(-DEXPORT_SHARED_API=1)\n\nif (BUILD_OBJECT_LIBRARY)\n add_library(lib${DOTNET_PROJECT_NAME} OBJECT ${SOURCES} ${RESOURCES})\nelse ()\n add_library(lib${DOTNET_PROJECT_NAME} STATIC ${SOURCES} ${RESOURCES})\nendif ()\n\nset_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES MACOSX_RPATH TRUE)\nset_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES PREFIX \"\")\n\nset_common_libs(\"lib-static\")\n"},"after_content":{"kind":"string","value":"# Licensed to the .NET Foundation under one or more agreements.\n# The .NET Foundation licenses this file to you under the MIT license.\n\nproject(lib${DOTNET_PROJECT_NAME})\n\ninclude(${CMAKE_CURRENT_LIST_DIR}/common.cmake)\n\nadd_definitions(-D_NO_ASYNCRTIMP)\nadd_definitions(-D_NO_PPLXIMP)\nadd_definitions(-DEXPORT_SHARED_API=1)\n\nif (BUILD_OBJECT_LIBRARY)\n add_library(lib${DOTNET_PROJECT_NAME} OBJECT ${SOURCES} ${RESOURCES})\nelse ()\n add_library(lib${DOTNET_PROJECT_NAME} STATIC ${SOURCES} ${RESOURCES})\nendif ()\n\nset_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES MACOSX_RPATH TRUE)\nset_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES PREFIX \"\")\n\nset_common_libs(\"lib-static\")\n"},"label":{"kind":"number","value":-1,"string":"-1"}}},{"rowIdx":2073590,"cells":{"repo_name":{"kind":"string","value":"dotnet/runtime"},"pr_number":{"kind":"number","value":65966,"string":"65,966"},"pr_title":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios"},"pr_description":{"kind":"string","value":"Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"author":{"kind":"string","value":"layomia"},"date_created":{"kind":"timestamp","value":"2022-02-28T18:25:51Z","string":"2022-02-28T18:25:51Z"},"date_merged":{"kind":"timestamp","value":"2022-05-24T22:19:32Z","string":"2022-05-24T22:19:32Z"},"previous_commit":{"kind":"string","value":"c5f949efa20bcb555c453037fa954fcc403f9490"},"pr_commit":{"kind":"string","value":"bfbb78354e536ac616f2f9dabf3db2b8fa8b9f64"},"query":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios. Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"filepath":{"kind":"string","value":"./src/tests/JIT/jit64/valuetypes/nullable/box-unbox/box-unbox/box-unbox038.cs"},"before_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\n// Nullable - Box-Unbox \n//
Nullable type with unbox box expr
\n// \n// checking type of ImplementOneInterface using is operator\n// \n// \n//\n// \n\n\nusing System.Runtime.InteropServices;\nusing System;\n\ninternal class NullableTest\n{\n private static bool BoxUnboxToNQ(object o)\n {\n return Helper.Compare((ImplementOneInterface)o, Helper.Create(default(ImplementOneInterface)));\n }\n\n private static bool BoxUnboxToQ(object o)\n {\n return Helper.Compare((ImplementOneInterface?)o, Helper.Create(default(ImplementOneInterface)));\n }\n\n private static int Main()\n {\n ImplementOneInterface? s = Helper.Create(default(ImplementOneInterface));\n\n if (BoxUnboxToNQ(s) && BoxUnboxToQ(s))\n return ExitCode.Passed;\n else\n return ExitCode.Failed;\n }\n}\n\n\n"},"after_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\n// Nullable - Box-Unbox \n// Nullable type with unbox box expr \n// \n// checking type of ImplementOneInterface using is operator\n// \n// \n//\n// \n\n\nusing System.Runtime.InteropServices;\nusing System;\n\ninternal class NullableTest\n{\n private static bool BoxUnboxToNQ(object o)\n {\n return Helper.Compare((ImplementOneInterface)o, Helper.Create(default(ImplementOneInterface)));\n }\n\n private static bool BoxUnboxToQ(object o)\n {\n return Helper.Compare((ImplementOneInterface?)o, Helper.Create(default(ImplementOneInterface)));\n }\n\n private static int Main()\n {\n ImplementOneInterface? s = Helper.Create(default(ImplementOneInterface));\n\n if (BoxUnboxToNQ(s) && BoxUnboxToQ(s))\n return ExitCode.Passed;\n else\n return ExitCode.Failed;\n }\n}\n\n\n"},"label":{"kind":"number","value":-1,"string":"-1"}}},{"rowIdx":2073591,"cells":{"repo_name":{"kind":"string","value":"dotnet/runtime"},"pr_number":{"kind":"number","value":65966,"string":"65,966"},"pr_title":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios"},"pr_description":{"kind":"string","value":"Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"author":{"kind":"string","value":"layomia"},"date_created":{"kind":"timestamp","value":"2022-02-28T18:25:51Z","string":"2022-02-28T18:25:51Z"},"date_merged":{"kind":"timestamp","value":"2022-05-24T22:19:32Z","string":"2022-05-24T22:19:32Z"},"previous_commit":{"kind":"string","value":"c5f949efa20bcb555c453037fa954fcc403f9490"},"pr_commit":{"kind":"string","value":"bfbb78354e536ac616f2f9dabf3db2b8fa8b9f64"},"query":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios. Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"filepath":{"kind":"string","value":"./src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/AggregateSymbol.cs"},"before_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing System;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Reflection;\nusing Microsoft.CSharp.RuntimeBinder.Syntax;\n\nnamespace Microsoft.CSharp.RuntimeBinder.Semantics\n{\n // Name used for AGGDECLs in the symbol table.\n\n // AggregateSymbol - a symbol representing an aggregate type. These are classes,\n // interfaces, and structs. Parent is a namespace or class. Children are methods,\n // properties, and member variables, and types (including its own AGGTYPESYMs).\n\n internal sealed class AggregateSymbol : NamespaceOrAggregateSymbol\n {\n public Type AssociatedSystemType;\n public Assembly AssociatedAssembly;\n\n // The instance type. Created when first needed.\n private AggregateType _atsInst;\n\n private AggregateType _pBaseClass; // For a class/struct/enum, the base class. For iface: unused.\n private AggregateType _pUnderlyingType; // For enum, the underlying type. For iface, the resolved CoClass. Not used for class/struct.\n\n private TypeArray _ifaces; // The explicit base interfaces for a class or interface.\n private TypeArray _ifacesAll; // Recursive closure of base interfaces ordered so an iface appears before all of its base ifaces.\n\n private TypeArray _typeVarsThis; // Type variables for this generic class, as declarations.\n private TypeArray _typeVarsAll; // The type variables for this generic class and all containing classes.\n\n // First UD conversion operator. This chain is for this type only (not base types).\n // The hasConversion flag indicates whether this or any base types have UD conversions.\n private MethodSymbol _pConvFirst;\n\n // ------------------------------------------------------------------------\n //\n // Put members that are bits under here in a contiguous section.\n //\n // ------------------------------------------------------------------------\n\n private AggKindEnum _aggKind;\n\n // Where this came from - fabricated, source, import\n // Fabricated AGGs have isSource == true but hasParseTree == false.\n // N.B.: in incremental builds, it is quite possible for\n // isSource==TRUE and hasParseTree==FALSE. Be\n // sure you use the correct variable for what you are trying to do!\n\n // Predefined\n private bool _isPredefined; // A special predefined type.\n private PredefinedType _iPredef; // index of the predefined type, if isPredefined.\n\n // Flags\n private bool _isAbstract; // Can it be instantiated?\n private bool _isSealed; // Can it be derived from?\n\n // Constructors\n private bool _hasPubNoArgCtor; // Whether it has a public instance constructor taking no args\n\n // User defined operators\n\n private bool _isSkipUDOps; // Never check for user defined operators on this type (eg, decimal, string, delegate).\n\n // When this is unset we don't know if we have conversions. When this\n // is set it indicates if this type or any base type has user defined\n // conversion operators\n private bool? _hasConversion;\n\n // ----------------------------------------------------------------------------\n // AggregateSymbol\n // ----------------------------------------------------------------------------\n\n public AggregateSymbol GetBaseAgg()\n {\n return _pBaseClass?.OwningAggregate;\n }\n\n public AggregateType getThisType()\n {\n if (_atsInst == null)\n {\n Debug.Assert(GetTypeVars() == GetTypeVarsAll() || isNested());\n\n AggregateType pOuterType = isNested() ? GetOuterAgg().getThisType() : null;\n\n _atsInst = TypeManager.GetAggregate(this, pOuterType, GetTypeVars());\n }\n\n //Debug.Assert(GetTypeVars().Size == atsInst.GenericArguments.Count);\n return _atsInst;\n }\n\n public bool FindBaseAgg(AggregateSymbol agg)\n {\n for (AggregateSymbol aggT = this; aggT != null; aggT = aggT.GetBaseAgg())\n {\n if (aggT == agg)\n return true;\n }\n return false;\n }\n\n public NamespaceOrAggregateSymbol Parent => parent as NamespaceOrAggregateSymbol;\n\n public bool isNested() => parent is AggregateSymbol;\n\n public AggregateSymbol GetOuterAgg() => parent as AggregateSymbol;\n\n public bool isPredefAgg(PredefinedType pt)\n {\n return _isPredefined && (PredefinedType)_iPredef == pt;\n }\n\n // ----------------------------------------------------------------------------\n // The following are the Accessor functions for AggregateSymbol.\n // ----------------------------------------------------------------------------\n\n public AggKindEnum AggKind()\n {\n return (AggKindEnum)_aggKind;\n }\n\n public void SetAggKind(AggKindEnum aggKind)\n {\n // NOTE: When importing can demote types:\n // - enums with no underlying type go to struct\n // - delegates which are abstract or have no .ctor/Invoke method goto class\n _aggKind = aggKind;\n\n //An interface is always abstract\n if (aggKind == AggKindEnum.Interface)\n {\n SetAbstract(true);\n }\n }\n\n public bool IsClass()\n {\n return AggKind() == AggKindEnum.Class;\n }\n\n public bool IsDelegate()\n {\n return AggKind() == AggKindEnum.Delegate;\n }\n\n public bool IsInterface()\n {\n return AggKind() == AggKindEnum.Interface;\n }\n\n public bool IsStruct()\n {\n return AggKind() == AggKindEnum.Struct;\n }\n\n public bool IsEnum()\n {\n return AggKind() == AggKindEnum.Enum;\n }\n\n public bool IsValueType()\n {\n return AggKind() == AggKindEnum.Struct || AggKind() == AggKindEnum.Enum;\n }\n\n public bool IsRefType()\n {\n return AggKind() == AggKindEnum.Class ||\n AggKind() == AggKindEnum.Interface || AggKind() == AggKindEnum.Delegate;\n }\n\n public bool IsStatic()\n {\n return (_isAbstract && _isSealed);\n }\n\n public bool IsAbstract()\n {\n return _isAbstract;\n }\n\n public void SetAbstract(bool @abstract)\n {\n _isAbstract = @abstract;\n }\n\n public bool IsPredefined()\n {\n return _isPredefined;\n }\n\n public void SetPredefined(bool predefined)\n {\n _isPredefined = predefined;\n }\n\n public PredefinedType GetPredefType()\n {\n return (PredefinedType)_iPredef;\n }\n\n public void SetPredefType(PredefinedType predef)\n {\n _iPredef = predef;\n }\n\n public bool IsSealed()\n {\n return _isSealed == true;\n }\n\n public void SetSealed(bool @sealed)\n {\n _isSealed = @sealed;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n\n [RequiresUnreferencedCode(Binder.TrimmerWarning)]\n public bool HasConversion()\n {\n SymbolTable.AddConversionsForType(AssociatedSystemType);\n\n if (!_hasConversion.HasValue)\n {\n // ok, we tried defining all the conversions, and we didn't get anything\n // for this type. However, we will still think this type has conversions\n // if it's base type has conversions.\n _hasConversion = GetBaseAgg() != null && GetBaseAgg().HasConversion();\n }\n\n return _hasConversion.Value;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n\n public void SetHasConversion()\n {\n _hasConversion = true;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n\n public bool HasPubNoArgCtor()\n {\n return _hasPubNoArgCtor == true;\n }\n\n public void SetHasPubNoArgCtor(bool hasPubNoArgCtor)\n {\n _hasPubNoArgCtor = hasPubNoArgCtor;\n }\n\n public bool IsSkipUDOps()\n {\n return _isSkipUDOps == true;\n }\n\n public void SetSkipUDOps(bool skipUDOps)\n {\n _isSkipUDOps = skipUDOps;\n }\n\n public TypeArray GetTypeVars()\n {\n return _typeVarsThis;\n }\n\n public void SetTypeVars(TypeArray typeVars)\n {\n if (typeVars == null)\n {\n _typeVarsThis = null;\n _typeVarsAll = null;\n }\n else\n {\n TypeArray outerTypeVars;\n if (GetOuterAgg() != null)\n {\n Debug.Assert(GetOuterAgg().GetTypeVars() != null);\n Debug.Assert(GetOuterAgg().GetTypeVarsAll() != null);\n\n outerTypeVars = GetOuterAgg().GetTypeVarsAll();\n }\n else\n {\n outerTypeVars = TypeArray.Empty;\n }\n\n _typeVarsThis = typeVars;\n _typeVarsAll = TypeArray.Concat(outerTypeVars, typeVars);\n }\n }\n\n public TypeArray GetTypeVarsAll()\n {\n return _typeVarsAll;\n }\n\n public AggregateType GetBaseClass()\n {\n return _pBaseClass;\n }\n\n public void SetBaseClass(AggregateType baseClass)\n {\n _pBaseClass = baseClass;\n }\n\n public AggregateType GetUnderlyingType()\n {\n return _pUnderlyingType;\n }\n\n public void SetUnderlyingType(AggregateType underlyingType)\n {\n _pUnderlyingType = underlyingType;\n }\n\n public TypeArray GetIfaces()\n {\n return _ifaces;\n }\n\n public void SetIfaces(TypeArray ifaces)\n {\n _ifaces = ifaces;\n }\n\n public TypeArray GetIfacesAll()\n {\n return _ifacesAll;\n }\n\n public void SetIfacesAll(TypeArray ifacesAll)\n {\n _ifacesAll = ifacesAll;\n }\n\n public MethodSymbol GetFirstUDConversion()\n {\n return _pConvFirst;\n }\n\n public void SetFirstUDConversion(MethodSymbol conv)\n {\n _pConvFirst = conv;\n }\n\n public bool InternalsVisibleTo(Assembly assembly) => TypeManager.InternalsVisibleTo(AssociatedAssembly, assembly);\n }\n}\n"},"after_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing System;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Reflection;\nusing Microsoft.CSharp.RuntimeBinder.Syntax;\n\nnamespace Microsoft.CSharp.RuntimeBinder.Semantics\n{\n // Name used for AGGDECLs in the symbol table.\n\n // AggregateSymbol - a symbol representing an aggregate type. These are classes,\n // interfaces, and structs. Parent is a namespace or class. Children are methods,\n // properties, and member variables, and types (including its own AGGTYPESYMs).\n\n internal sealed class AggregateSymbol : NamespaceOrAggregateSymbol\n {\n public Type AssociatedSystemType;\n public Assembly AssociatedAssembly;\n\n // The instance type. Created when first needed.\n private AggregateType _atsInst;\n\n private AggregateType _pBaseClass; // For a class/struct/enum, the base class. For iface: unused.\n private AggregateType _pUnderlyingType; // For enum, the underlying type. For iface, the resolved CoClass. Not used for class/struct.\n\n private TypeArray _ifaces; // The explicit base interfaces for a class or interface.\n private TypeArray _ifacesAll; // Recursive closure of base interfaces ordered so an iface appears before all of its base ifaces.\n\n private TypeArray _typeVarsThis; // Type variables for this generic class, as declarations.\n private TypeArray _typeVarsAll; // The type variables for this generic class and all containing classes.\n\n // First UD conversion operator. This chain is for this type only (not base types).\n // The hasConversion flag indicates whether this or any base types have UD conversions.\n private MethodSymbol _pConvFirst;\n\n // ------------------------------------------------------------------------\n //\n // Put members that are bits under here in a contiguous section.\n //\n // ------------------------------------------------------------------------\n\n private AggKindEnum _aggKind;\n\n // Where this came from - fabricated, source, import\n // Fabricated AGGs have isSource == true but hasParseTree == false.\n // N.B.: in incremental builds, it is quite possible for\n // isSource==TRUE and hasParseTree==FALSE. Be\n // sure you use the correct variable for what you are trying to do!\n\n // Predefined\n private bool _isPredefined; // A special predefined type.\n private PredefinedType _iPredef; // index of the predefined type, if isPredefined.\n\n // Flags\n private bool _isAbstract; // Can it be instantiated?\n private bool _isSealed; // Can it be derived from?\n\n // Constructors\n private bool _hasPubNoArgCtor; // Whether it has a public instance constructor taking no args\n\n // User defined operators\n\n private bool _isSkipUDOps; // Never check for user defined operators on this type (eg, decimal, string, delegate).\n\n // When this is unset we don't know if we have conversions. When this\n // is set it indicates if this type or any base type has user defined\n // conversion operators\n private bool? _hasConversion;\n\n // ----------------------------------------------------------------------------\n // AggregateSymbol\n // ----------------------------------------------------------------------------\n\n public AggregateSymbol GetBaseAgg()\n {\n return _pBaseClass?.OwningAggregate;\n }\n\n public AggregateType getThisType()\n {\n if (_atsInst == null)\n {\n Debug.Assert(GetTypeVars() == GetTypeVarsAll() || isNested());\n\n AggregateType pOuterType = isNested() ? GetOuterAgg().getThisType() : null;\n\n _atsInst = TypeManager.GetAggregate(this, pOuterType, GetTypeVars());\n }\n\n //Debug.Assert(GetTypeVars().Size == atsInst.GenericArguments.Count);\n return _atsInst;\n }\n\n public bool FindBaseAgg(AggregateSymbol agg)\n {\n for (AggregateSymbol aggT = this; aggT != null; aggT = aggT.GetBaseAgg())\n {\n if (aggT == agg)\n return true;\n }\n return false;\n }\n\n public NamespaceOrAggregateSymbol Parent => parent as NamespaceOrAggregateSymbol;\n\n public bool isNested() => parent is AggregateSymbol;\n\n public AggregateSymbol GetOuterAgg() => parent as AggregateSymbol;\n\n public bool isPredefAgg(PredefinedType pt)\n {\n return _isPredefined && (PredefinedType)_iPredef == pt;\n }\n\n // ----------------------------------------------------------------------------\n // The following are the Accessor functions for AggregateSymbol.\n // ----------------------------------------------------------------------------\n\n public AggKindEnum AggKind()\n {\n return (AggKindEnum)_aggKind;\n }\n\n public void SetAggKind(AggKindEnum aggKind)\n {\n // NOTE: When importing can demote types:\n // - enums with no underlying type go to struct\n // - delegates which are abstract or have no .ctor/Invoke method goto class\n _aggKind = aggKind;\n\n //An interface is always abstract\n if (aggKind == AggKindEnum.Interface)\n {\n SetAbstract(true);\n }\n }\n\n public bool IsClass()\n {\n return AggKind() == AggKindEnum.Class;\n }\n\n public bool IsDelegate()\n {\n return AggKind() == AggKindEnum.Delegate;\n }\n\n public bool IsInterface()\n {\n return AggKind() == AggKindEnum.Interface;\n }\n\n public bool IsStruct()\n {\n return AggKind() == AggKindEnum.Struct;\n }\n\n public bool IsEnum()\n {\n return AggKind() == AggKindEnum.Enum;\n }\n\n public bool IsValueType()\n {\n return AggKind() == AggKindEnum.Struct || AggKind() == AggKindEnum.Enum;\n }\n\n public bool IsRefType()\n {\n return AggKind() == AggKindEnum.Class ||\n AggKind() == AggKindEnum.Interface || AggKind() == AggKindEnum.Delegate;\n }\n\n public bool IsStatic()\n {\n return (_isAbstract && _isSealed);\n }\n\n public bool IsAbstract()\n {\n return _isAbstract;\n }\n\n public void SetAbstract(bool @abstract)\n {\n _isAbstract = @abstract;\n }\n\n public bool IsPredefined()\n {\n return _isPredefined;\n }\n\n public void SetPredefined(bool predefined)\n {\n _isPredefined = predefined;\n }\n\n public PredefinedType GetPredefType()\n {\n return (PredefinedType)_iPredef;\n }\n\n public void SetPredefType(PredefinedType predef)\n {\n _iPredef = predef;\n }\n\n public bool IsSealed()\n {\n return _isSealed == true;\n }\n\n public void SetSealed(bool @sealed)\n {\n _isSealed = @sealed;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n\n [RequiresUnreferencedCode(Binder.TrimmerWarning)]\n public bool HasConversion()\n {\n SymbolTable.AddConversionsForType(AssociatedSystemType);\n\n if (!_hasConversion.HasValue)\n {\n // ok, we tried defining all the conversions, and we didn't get anything\n // for this type. However, we will still think this type has conversions\n // if it's base type has conversions.\n _hasConversion = GetBaseAgg() != null && GetBaseAgg().HasConversion();\n }\n\n return _hasConversion.Value;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n\n public void SetHasConversion()\n {\n _hasConversion = true;\n }\n\n ////////////////////////////////////////////////////////////////////////////////\n\n public bool HasPubNoArgCtor()\n {\n return _hasPubNoArgCtor == true;\n }\n\n public void SetHasPubNoArgCtor(bool hasPubNoArgCtor)\n {\n _hasPubNoArgCtor = hasPubNoArgCtor;\n }\n\n public bool IsSkipUDOps()\n {\n return _isSkipUDOps == true;\n }\n\n public void SetSkipUDOps(bool skipUDOps)\n {\n _isSkipUDOps = skipUDOps;\n }\n\n public TypeArray GetTypeVars()\n {\n return _typeVarsThis;\n }\n\n public void SetTypeVars(TypeArray typeVars)\n {\n if (typeVars == null)\n {\n _typeVarsThis = null;\n _typeVarsAll = null;\n }\n else\n {\n TypeArray outerTypeVars;\n if (GetOuterAgg() != null)\n {\n Debug.Assert(GetOuterAgg().GetTypeVars() != null);\n Debug.Assert(GetOuterAgg().GetTypeVarsAll() != null);\n\n outerTypeVars = GetOuterAgg().GetTypeVarsAll();\n }\n else\n {\n outerTypeVars = TypeArray.Empty;\n }\n\n _typeVarsThis = typeVars;\n _typeVarsAll = TypeArray.Concat(outerTypeVars, typeVars);\n }\n }\n\n public TypeArray GetTypeVarsAll()\n {\n return _typeVarsAll;\n }\n\n public AggregateType GetBaseClass()\n {\n return _pBaseClass;\n }\n\n public void SetBaseClass(AggregateType baseClass)\n {\n _pBaseClass = baseClass;\n }\n\n public AggregateType GetUnderlyingType()\n {\n return _pUnderlyingType;\n }\n\n public void SetUnderlyingType(AggregateType underlyingType)\n {\n _pUnderlyingType = underlyingType;\n }\n\n public TypeArray GetIfaces()\n {\n return _ifaces;\n }\n\n public void SetIfaces(TypeArray ifaces)\n {\n _ifaces = ifaces;\n }\n\n public TypeArray GetIfacesAll()\n {\n return _ifacesAll;\n }\n\n public void SetIfacesAll(TypeArray ifacesAll)\n {\n _ifacesAll = ifacesAll;\n }\n\n public MethodSymbol GetFirstUDConversion()\n {\n return _pConvFirst;\n }\n\n public void SetFirstUDConversion(MethodSymbol conv)\n {\n _pConvFirst = conv;\n }\n\n public bool InternalsVisibleTo(Assembly assembly) => TypeManager.InternalsVisibleTo(AssociatedAssembly, assembly);\n }\n}\n"},"label":{"kind":"number","value":-1,"string":"-1"}}},{"rowIdx":2073592,"cells":{"repo_name":{"kind":"string","value":"dotnet/runtime"},"pr_number":{"kind":"number","value":65966,"string":"65,966"},"pr_title":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios"},"pr_description":{"kind":"string","value":"Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"author":{"kind":"string","value":"layomia"},"date_created":{"kind":"timestamp","value":"2022-02-28T18:25:51Z","string":"2022-02-28T18:25:51Z"},"date_merged":{"kind":"timestamp","value":"2022-05-24T22:19:32Z","string":"2022-05-24T22:19:32Z"},"previous_commit":{"kind":"string","value":"c5f949efa20bcb555c453037fa954fcc403f9490"},"pr_commit":{"kind":"string","value":"bfbb78354e536ac616f2f9dabf3db2b8fa8b9f64"},"query":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios. Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"filepath":{"kind":"string","value":"./src/tests/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.Int32.0.cs"},"before_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\n/******************************************************************************\n * This file is auto-generated from a template file by the GenerateTests.csx *\n * script in tests\\src\\JIT\\HardwareIntrinsics\\X86\\Shared. In order to make *\n * changes, please update the corresponding template and run according to the *\n * directions listed in the file. *\n ******************************************************************************/\n\nusing System;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Runtime.Intrinsics;\nusing System.Runtime.Intrinsics.X86;\n\nnamespace JIT.HardwareIntrinsics.X86\n{\n public static partial class Program\n {\n private static void AlignRightInt320()\n {\n var test = new ImmBinaryOpTest__AlignRightInt320();\n\n if (test.IsSupported)\n {\n // Validates basic functionality works, using Unsafe.Read\n test.RunBasicScenario_UnsafeRead();\n\n if (Avx.IsSupported)\n {\n // Validates basic functionality works, using Load\n test.RunBasicScenario_Load();\n\n // Validates basic functionality works, using LoadAligned\n test.RunBasicScenario_LoadAligned();\n }\n\n // Validates calling via reflection works, using Unsafe.Read\n test.RunReflectionScenario_UnsafeRead();\n\n if (Avx.IsSupported)\n {\n // Validates calling via reflection works, using Load\n test.RunReflectionScenario_Load();\n\n // Validates calling via reflection works, using LoadAligned\n test.RunReflectionScenario_LoadAligned();\n }\n\n // Validates passing a static member works\n test.RunClsVarScenario();\n\n // Validates passing a local works, using Unsafe.Read\n test.RunLclVarScenario_UnsafeRead();\n\n if (Avx.IsSupported)\n {\n // Validates passing a local works, using Load\n test.RunLclVarScenario_Load();\n\n // Validates passing a local works, using LoadAligned\n test.RunLclVarScenario_LoadAligned();\n }\n\n // Validates passing the field of a local class works\n test.RunClassLclFldScenario();\n\n // Validates passing an instance member of a class works\n test.RunClassFldScenario();\n\n // Validates passing the field of a local struct works\n test.RunStructLclFldScenario();\n\n // Validates passing an instance member of a struct works\n test.RunStructFldScenario();\n }\n else\n {\n // Validates we throw on unsupported hardware\n test.RunUnsupportedScenario();\n }\n\n if (!test.Succeeded)\n {\n throw new Exception(\"One or more scenarios did not complete as expected.\");\n }\n }\n }\n\n public sealed unsafe class ImmBinaryOpTest__AlignRightInt320\n {\n private struct TestStruct\n {\n public Vector256 _fld1;\n public Vector256 _fld2;\n\n public static TestStruct Create()\n {\n var testStruct = new TestStruct();\n\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>());\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>());\n\n return testStruct;\n }\n\n public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt320 testClass)\n {\n var result = Avx2.AlignRight(_fld1, _fld2, 0);\n\n Unsafe.Write(testClass._dataTable.outArrayPtr, result);\n testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);\n }\n }\n\n private static readonly int LargestVectorSize = 32;\n\n private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32);\n private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32);\n private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32);\n\n private static Int32[] _data1 = new Int32[Op1ElementCount];\n private static Int32[] _data2 = new Int32[Op2ElementCount];\n\n private static Vector256 _clsVar1;\n private static Vector256 _clsVar2;\n\n private Vector256 _fld1;\n private Vector256 _fld2;\n\n private SimpleBinaryOpTest__DataTable _dataTable;\n\n static ImmBinaryOpTest__AlignRightInt320()\n {\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>());\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>());\n }\n\n public ImmBinaryOpTest__AlignRightInt320()\n {\n Succeeded = true;\n\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>());\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>());\n\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize);\n }\n\n public bool IsSupported => Avx2.IsSupported;\n\n public bool Succeeded { get; set; }\n\n public void RunBasicScenario_UnsafeRead()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));\n\n var result = Avx2.AlignRight(\n Unsafe.Read>(_dataTable.inArray1Ptr),\n Unsafe.Read>(_dataTable.inArray2Ptr),\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunBasicScenario_Load()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));\n\n var result = Avx2.AlignRight(\n Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)),\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunBasicScenario_LoadAligned()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned));\n\n var result = Avx2.AlignRight(\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)),\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunReflectionScenario_UnsafeRead()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));\n\n var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) })\n .Invoke(null, new object[] {\n Unsafe.Read>(_dataTable.inArray1Ptr),\n Unsafe.Read>(_dataTable.inArray2Ptr),\n (byte)0\n });\n\n Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result));\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunReflectionScenario_Load()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load));\n\n var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) })\n .Invoke(null, new object[] {\n Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)),\n (byte)0\n });\n\n Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result));\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunReflectionScenario_LoadAligned()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned));\n\n var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) })\n .Invoke(null, new object[] {\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)),\n (byte)0\n });\n\n Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result));\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunClsVarScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));\n\n var result = Avx2.AlignRight(\n _clsVar1,\n _clsVar2,\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);\n }\n\n public void RunLclVarScenario_UnsafeRead()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));\n\n var left = Unsafe.Read>(_dataTable.inArray1Ptr);\n var right = Unsafe.Read>(_dataTable.inArray2Ptr);\n var result = Avx2.AlignRight(left, right, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(left, right, _dataTable.outArrayPtr);\n }\n\n public void RunLclVarScenario_Load()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load));\n\n var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr));\n var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr));\n var result = Avx2.AlignRight(left, right, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(left, right, _dataTable.outArrayPtr);\n }\n\n public void RunLclVarScenario_LoadAligned()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned));\n\n var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr));\n var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr));\n var result = Avx2.AlignRight(left, right, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(left, right, _dataTable.outArrayPtr);\n }\n\n public void RunClassLclFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));\n\n var test = new ImmBinaryOpTest__AlignRightInt320();\n var result = Avx2.AlignRight(test._fld1, test._fld2, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);\n }\n\n public void RunClassFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));\n\n var result = Avx2.AlignRight(_fld1, _fld2, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);\n }\n\n public void RunStructLclFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));\n\n var test = TestStruct.Create();\n var result = Avx2.AlignRight(test._fld1, test._fld2, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);\n }\n\n public void RunStructFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));\n\n var test = TestStruct.Create();\n test.RunStructFldScenario(this);\n }\n\n public void RunUnsupportedScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario));\n\n bool succeeded = false;\n\n try\n {\n RunBasicScenario_UnsafeRead();\n }\n catch (PlatformNotSupportedException)\n {\n succeeded = true;\n }\n\n if (!succeeded)\n {\n Succeeded = false;\n }\n }\n\n private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = \"\")\n {\n Int32[] inArray1 = new Int32[Op1ElementCount];\n Int32[] inArray2 = new Int32[Op2ElementCount];\n Int32[] outArray = new Int32[RetElementCount];\n\n Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left);\n Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right);\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>());\n\n ValidateResult(inArray1, inArray2, outArray, method);\n }\n\n private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = \"\")\n {\n Int32[] inArray1 = new Int32[Op1ElementCount];\n Int32[] inArray2 = new Int32[Op2ElementCount];\n Int32[] outArray = new Int32[RetElementCount];\n\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>());\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>());\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>());\n\n ValidateResult(inArray1, inArray2, outArray, method);\n }\n\n private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = \"\")\n {\n bool succeeded = true;\n\n if (result[0] != right[0])\n {\n succeeded = false;\n }\n else\n {\n for (var i = 1; i < RetElementCount; i++)\n {\n if (result[i] != right[i])\n {\n succeeded = false;\n break;\n }\n }\n }\n\n if (!succeeded)\n {\n TestLibrary.TestFramework.LogInformation($\"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:\");\n TestLibrary.TestFramework.LogInformation($\" left: ({string.Join(\", \", left)})\");\n TestLibrary.TestFramework.LogInformation($\" right: ({string.Join(\", \", right)})\");\n TestLibrary.TestFramework.LogInformation($\" result: ({string.Join(\", \", result)})\");\n TestLibrary.TestFramework.LogInformation(string.Empty);\n\n Succeeded = false;\n }\n }\n }\n}\n"},"after_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\n/******************************************************************************\n * This file is auto-generated from a template file by the GenerateTests.csx *\n * script in tests\\src\\JIT\\HardwareIntrinsics\\X86\\Shared. In order to make *\n * changes, please update the corresponding template and run according to the *\n * directions listed in the file. *\n ******************************************************************************/\n\nusing System;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Runtime.Intrinsics;\nusing System.Runtime.Intrinsics.X86;\n\nnamespace JIT.HardwareIntrinsics.X86\n{\n public static partial class Program\n {\n private static void AlignRightInt320()\n {\n var test = new ImmBinaryOpTest__AlignRightInt320();\n\n if (test.IsSupported)\n {\n // Validates basic functionality works, using Unsafe.Read\n test.RunBasicScenario_UnsafeRead();\n\n if (Avx.IsSupported)\n {\n // Validates basic functionality works, using Load\n test.RunBasicScenario_Load();\n\n // Validates basic functionality works, using LoadAligned\n test.RunBasicScenario_LoadAligned();\n }\n\n // Validates calling via reflection works, using Unsafe.Read\n test.RunReflectionScenario_UnsafeRead();\n\n if (Avx.IsSupported)\n {\n // Validates calling via reflection works, using Load\n test.RunReflectionScenario_Load();\n\n // Validates calling via reflection works, using LoadAligned\n test.RunReflectionScenario_LoadAligned();\n }\n\n // Validates passing a static member works\n test.RunClsVarScenario();\n\n // Validates passing a local works, using Unsafe.Read\n test.RunLclVarScenario_UnsafeRead();\n\n if (Avx.IsSupported)\n {\n // Validates passing a local works, using Load\n test.RunLclVarScenario_Load();\n\n // Validates passing a local works, using LoadAligned\n test.RunLclVarScenario_LoadAligned();\n }\n\n // Validates passing the field of a local class works\n test.RunClassLclFldScenario();\n\n // Validates passing an instance member of a class works\n test.RunClassFldScenario();\n\n // Validates passing the field of a local struct works\n test.RunStructLclFldScenario();\n\n // Validates passing an instance member of a struct works\n test.RunStructFldScenario();\n }\n else\n {\n // Validates we throw on unsupported hardware\n test.RunUnsupportedScenario();\n }\n\n if (!test.Succeeded)\n {\n throw new Exception(\"One or more scenarios did not complete as expected.\");\n }\n }\n }\n\n public sealed unsafe class ImmBinaryOpTest__AlignRightInt320\n {\n private struct TestStruct\n {\n public Vector256 _fld1;\n public Vector256 _fld2;\n\n public static TestStruct Create()\n {\n var testStruct = new TestStruct();\n\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>());\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>());\n\n return testStruct;\n }\n\n public void RunStructFldScenario(ImmBinaryOpTest__AlignRightInt320 testClass)\n {\n var result = Avx2.AlignRight(_fld1, _fld2, 0);\n\n Unsafe.Write(testClass._dataTable.outArrayPtr, result);\n testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);\n }\n }\n\n private static readonly int LargestVectorSize = 32;\n\n private static readonly int Op1ElementCount = Unsafe.SizeOf>() / sizeof(Int32);\n private static readonly int Op2ElementCount = Unsafe.SizeOf>() / sizeof(Int32);\n private static readonly int RetElementCount = Unsafe.SizeOf>() / sizeof(Int32);\n\n private static Int32[] _data1 = new Int32[Op1ElementCount];\n private static Int32[] _data2 = new Int32[Op2ElementCount];\n\n private static Vector256 _clsVar1;\n private static Vector256 _clsVar2;\n\n private Vector256 _fld1;\n private Vector256 _fld2;\n\n private SimpleBinaryOpTest__DataTable _dataTable;\n\n static ImmBinaryOpTest__AlignRightInt320()\n {\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>());\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>());\n }\n\n public ImmBinaryOpTest__AlignRightInt320()\n {\n Succeeded = true;\n\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>());\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>());\n\n for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); }\n for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); }\n _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize);\n }\n\n public bool IsSupported => Avx2.IsSupported;\n\n public bool Succeeded { get; set; }\n\n public void RunBasicScenario_UnsafeRead()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));\n\n var result = Avx2.AlignRight(\n Unsafe.Read>(_dataTable.inArray1Ptr),\n Unsafe.Read>(_dataTable.inArray2Ptr),\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunBasicScenario_Load()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));\n\n var result = Avx2.AlignRight(\n Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)),\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunBasicScenario_LoadAligned()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_LoadAligned));\n\n var result = Avx2.AlignRight(\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)),\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunReflectionScenario_UnsafeRead()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead));\n\n var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) })\n .Invoke(null, new object[] {\n Unsafe.Read>(_dataTable.inArray1Ptr),\n Unsafe.Read>(_dataTable.inArray2Ptr),\n (byte)0\n });\n\n Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result));\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunReflectionScenario_Load()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_Load));\n\n var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) })\n .Invoke(null, new object[] {\n Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr)),\n (byte)0\n });\n\n Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result));\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunReflectionScenario_LoadAligned()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_LoadAligned));\n\n var result = typeof(Avx2).GetMethod(nameof(Avx2.AlignRight), new Type[] { typeof(Vector256), typeof(Vector256), typeof(byte) })\n .Invoke(null, new object[] {\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr)),\n Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr)),\n (byte)0\n });\n\n Unsafe.Write(_dataTable.outArrayPtr, (Vector256)(result));\n ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);\n }\n\n public void RunClsVarScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunClsVarScenario));\n\n var result = Avx2.AlignRight(\n _clsVar1,\n _clsVar2,\n 0\n );\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);\n }\n\n public void RunLclVarScenario_UnsafeRead()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));\n\n var left = Unsafe.Read>(_dataTable.inArray1Ptr);\n var right = Unsafe.Read>(_dataTable.inArray2Ptr);\n var result = Avx2.AlignRight(left, right, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(left, right, _dataTable.outArrayPtr);\n }\n\n public void RunLclVarScenario_Load()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_Load));\n\n var left = Avx.LoadVector256((Int32*)(_dataTable.inArray1Ptr));\n var right = Avx.LoadVector256((Int32*)(_dataTable.inArray2Ptr));\n var result = Avx2.AlignRight(left, right, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(left, right, _dataTable.outArrayPtr);\n }\n\n public void RunLclVarScenario_LoadAligned()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned));\n\n var left = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray1Ptr));\n var right = Avx.LoadAlignedVector256((Int32*)(_dataTable.inArray2Ptr));\n var result = Avx2.AlignRight(left, right, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(left, right, _dataTable.outArrayPtr);\n }\n\n public void RunClassLclFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));\n\n var test = new ImmBinaryOpTest__AlignRightInt320();\n var result = Avx2.AlignRight(test._fld1, test._fld2, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);\n }\n\n public void RunClassFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));\n\n var result = Avx2.AlignRight(_fld1, _fld2, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);\n }\n\n public void RunStructLclFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));\n\n var test = TestStruct.Create();\n var result = Avx2.AlignRight(test._fld1, test._fld2, 0);\n\n Unsafe.Write(_dataTable.outArrayPtr, result);\n ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);\n }\n\n public void RunStructFldScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario));\n\n var test = TestStruct.Create();\n test.RunStructFldScenario(this);\n }\n\n public void RunUnsupportedScenario()\n {\n TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario));\n\n bool succeeded = false;\n\n try\n {\n RunBasicScenario_UnsafeRead();\n }\n catch (PlatformNotSupportedException)\n {\n succeeded = true;\n }\n\n if (!succeeded)\n {\n Succeeded = false;\n }\n }\n\n private void ValidateResult(Vector256 left, Vector256 right, void* result, [CallerMemberName] string method = \"\")\n {\n Int32[] inArray1 = new Int32[Op1ElementCount];\n Int32[] inArray2 = new Int32[Op2ElementCount];\n Int32[] outArray = new Int32[RetElementCount];\n\n Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray1[0]), left);\n Unsafe.WriteUnaligned(ref Unsafe.As(ref inArray2[0]), right);\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>());\n\n ValidateResult(inArray1, inArray2, outArray, method);\n }\n\n private void ValidateResult(void* left, void* right, void* result, [CallerMemberName] string method = \"\")\n {\n Int32[] inArray1 = new Int32[Op1ElementCount];\n Int32[] inArray2 = new Int32[Op2ElementCount];\n Int32[] outArray = new Int32[RetElementCount];\n\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray1[0]), ref Unsafe.AsRef(left), (uint)Unsafe.SizeOf>());\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref inArray2[0]), ref Unsafe.AsRef(right), (uint)Unsafe.SizeOf>());\n Unsafe.CopyBlockUnaligned(ref Unsafe.As(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf>());\n\n ValidateResult(inArray1, inArray2, outArray, method);\n }\n\n private void ValidateResult(Int32[] left, Int32[] right, Int32[] result, [CallerMemberName] string method = \"\")\n {\n bool succeeded = true;\n\n if (result[0] != right[0])\n {\n succeeded = false;\n }\n else\n {\n for (var i = 1; i < RetElementCount; i++)\n {\n if (result[i] != right[i])\n {\n succeeded = false;\n break;\n }\n }\n }\n\n if (!succeeded)\n {\n TestLibrary.TestFramework.LogInformation($\"{nameof(Avx2)}.{nameof(Avx2.AlignRight)}(Vector256.0, Vector256): {method} failed:\");\n TestLibrary.TestFramework.LogInformation($\" left: ({string.Join(\", \", left)})\");\n TestLibrary.TestFramework.LogInformation($\" right: ({string.Join(\", \", right)})\");\n TestLibrary.TestFramework.LogInformation($\" result: ({string.Join(\", \", result)})\");\n TestLibrary.TestFramework.LogInformation(string.Empty);\n\n Succeeded = false;\n }\n }\n }\n}\n"},"label":{"kind":"number","value":-1,"string":"-1"}}},{"rowIdx":2073593,"cells":{"repo_name":{"kind":"string","value":"dotnet/runtime"},"pr_number":{"kind":"number","value":65966,"string":"65,966"},"pr_title":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios"},"pr_description":{"kind":"string","value":"Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"author":{"kind":"string","value":"layomia"},"date_created":{"kind":"timestamp","value":"2022-02-28T18:25:51Z","string":"2022-02-28T18:25:51Z"},"date_merged":{"kind":"timestamp","value":"2022-05-24T22:19:32Z","string":"2022-05-24T22:19:32Z"},"previous_commit":{"kind":"string","value":"c5f949efa20bcb555c453037fa954fcc403f9490"},"pr_commit":{"kind":"string","value":"bfbb78354e536ac616f2f9dabf3db2b8fa8b9f64"},"query":{"kind":"string","value":"Use SubtleCrypto API on browser DOM scenarios. Contributes to https://github.com/dotnet/runtime/issues/40074. For WASM, uses the [SubtleCrypto](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) browser-native implementation for the SHA1, SHA256, SHA384, SHA512 algorithms, and adds infrastructure to support using the native implementation. Support for the rest of the algorithms will come in a single follow-up PR."},"filepath":{"kind":"string","value":"./src/libraries/System.Private.CoreLib/src/System/Resources/ResourceReader.Core.cs"},"before_content":{"kind":"string","value":"// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.Serialization;\nusing System.Text;\nusing System.Threading;\n\nnamespace System.Resources\n{\n public partial class ResourceReader\n {\n private readonly bool _permitDeserialization; // can deserialize BinaryFormatted resources\n private object? _binaryFormatter; // binary formatter instance to use for deserializing\n\n // statics used to dynamically call into BinaryFormatter\n // When successfully located s_binaryFormatterType will point to the BinaryFormatter type\n // and s_deserializeMethod will point to an unbound delegate to the deserialize method.\n [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]\n private static Type? s_binaryFormatterType;\n private static Func