Share via


Field Element (ProxyGen)

Represents a field that is defined in a proxy exception for a managed exception.

<Field isExcluded = "true/false"
    originalName = "Name of original field"
    newName = "Name of proxy field">
  <Attribute>...</Attribute>
  <DeclaringType>...</DeclaringType>
  <Type>...</Type>
</Field>

ManagedField_Type

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

isExcluded

Optional xs:boolean attribute.

true to omit the field from the proxy code; false to include the field in the proxy code. The default is false.

newName

Optional identifier_Type attribute.

The new name of the field in the proxy code.

originalName

Required identifier_Type attribute.

The name of the original field in the host application's object model.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the field.

DeclaringType

Optional TypeReference_Type element.

Represents the interface or base type in which the field is declared. The type cannot be an array.

Type

Required ArrayTypeReference_Type element.

Describes the type of the field. The type can be an array.

Parent Elements

Element

Description

Exception

Represents a proxy exception for a managed exception.

Example

The following example demonstrates a Field element that represents a field named invalidLocation in a proxy exception named LocationInvalidException.

<Exception originalFullyQualifiedName="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.LocationInvalidException" isExcluded="false">
  <BaseType>
    <ExternalTypeReference isInterface="false" type="System.Exception" />
  </BaseType>
  <Field originalName="invalidLocation" isExcluded="false">
    <Type>
      <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Point" />
    </Type>
  </Field>
</Exception>

Element Information

Namespace

https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor

Schema name

ProxyGen Descriptor

Validation file

ProxyGenDescriptorv2.xsd

Can be empty

No

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes