A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/windows/uwp/dotnet-native/application-element-net-native below:

<Application> Element (.NET Native) - UWP applications

<Application> Element (.NET Native)

In this article

Serves as a container for application-wide types and type members whose metadata is available for reflection at run time, and applies runtime reflection policy to all the program elements in an app.

<Directives> Element <Application> Element (rd.xml)

Syntax
<Application Activate="policy_setting"
             Browse="policy_setting"
             Dynamic="policy_setting"
             Serialize="policy_setting"
             DataContractSerializer="policy_setting"
             DataContractJsonSerializer="policy_setting"
             XmlSerializer="policy_setting"
             MarshalObject="policy_setting"
             MarshalDelegate="policy_setting"
             MarshalStructure="policy_setting" />
Attributes and Elements

The following sections describe attributes, child elements, and parent elements. In the Child Elements table, policy refers to the kind of metadata that is made available for particular program elements at run time.

Attributes Attribute Attribute type Description Activate Reflection Optional attribute. Controls runtime access to constructors to enable activation of instances. Browse Reflection Optional attribute. Controls querying for information about or enumerating the types, but does not enable any dynamic access at run time. Dynamic Reflection Optional attribute. Controls runtime access to all type members, including constructors, methods, fields, properties, and events, to enable dynamic programming. Serialize Serialization Optional attribute. Controls runtime access to constructors, fields, and properties, to enable type instances to be serialized and deserialized by libraries such as the Newtonsoft JSON serializer. DataContractSerializer Serialization Optional Attribute. Controls policy for serialization that uses the System.Runtime.Serialization.DataContractSerializer class. DataContractJsonSerializer Serialization Optional Attribute. Controls policy for JSON serialization that uses the System.Runtime.Serialization.Json.DataContractJsonSerializer class. XmlSerializer Serialization Optional Attribute. Controls policy for XML serialization that uses the System.Xml.Serialization.XmlSerializer class. MarshalObject Interop Optional Attribute. Controls policy for marshaling reference types to Windows Runtime and COM. MarshalDelegate Interop Optional Attribute. Controls policy for marshaling delegate types as function pointers to native code. MarshalStructure Interop Optional Attribute. Controls policy for marshaling structures to native code. All attributes Value Description policy_setting The setting for this policy to apply to the types in the app. Possible values are All, Auto, Excluded, Public, PublicAndInternal, Required Public, Required PublicAndInternal, and Required All. For more information, see Runtime Directive Policy Settings. Child Elements Element Description <Assembly> Applies policy to all the types in a particular assembly. <Namespace> Applies policy to all the types in a particular namespace. <Type> Applies policy to a particular type, such as a class or structure. <TypeInstantiation> Applies policy to a constructed generic type. For example, a <TypeInstantiation> element could be used to define policy for a List<String> type. <Method> Applies policy to a method on a particular type. <MethodInstantiation> Applies policy to a constructed generic method. <Property> Applies policy to a property on a particular type. <Field> Applies policy to a field on a particular type. <Event> Applies policy to an event on a particular type. Parent Elements Element Description <Directives> The root element of a runtime directives file.

The <Directives> element can contain zero or one <Application> element. Multiple <Application> elements in a single reflection directives file are not supported.

The <Application> element can be used in one of two ways:

See also

Additional resources

In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4