18 references to ToArray
System.Private.CoreLib (18)
System\Reflection\Attribute.NativeAot.cs (4)
42return matches.Select(m => m.Instantiate()).ToArray(); 55return matches.Select(m => m.Instantiate()).ToArray(); 66return matches.Select(m => m.Instantiate()).ToArray(); 79return matches.Select(m => m.Instantiate()).ToArray();
System\Reflection\Runtime\General\Helpers.cs (1)
66return Array.AsReadOnly(enumeration.ToArray());
System\Reflection\Runtime\General\LegacyCustomAttributeApis.cs (9)
31public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this).ToArray(); // inherit is meaningless for Assemblies 54public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this, inherit).ToArray(); 77public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this, inherit: false).ToArray(); // Desktop compat: for events, this form of the api ignores "inherit" 100public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this, inherit).ToArray(); 123public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this, inherit).ToArray(); 146public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this).ToArray(); // inherit is meaningless for Modules 169public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this, inherit: false).ToArray(); // Desktop compat: for parameters, this form of the api ignores "inherit" 192public sealed override object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this, inherit: false).ToArray(); // Desktop compat: for properties, this form of the api ignores "inherit" 215public object[] GetCustomAttributes(bool inherit) => CustomAttributeExtensions.GetCustomAttributes(this.ToType(), inherit).ToArray();
System\Reflection\Runtime\General\ThunkedApis.cs (4)
24public sealed override Type[] GetExportedTypes() => ExportedTypes.ToArray(); 25public sealed override Module[] GetLoadedModules(bool getResourceModules) => Modules.ToArray(); 26public sealed override Module[] GetModules(bool getResourceModules) => Modules.ToArray(); 28public sealed override Type[] GetTypes() => DefinedTypes.ToArray();