NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ICodeSourceFile.CreatePropertySetStatement

Constructs a property set statement. This represents a single property set inside of a method.

[Visual Basic]
Function CreatePropertySetStatement( _
   ByVal target() As String, _
   ByVal targetType As ICodeClass, _
   ByVal propertyName As String, _
   ByVal neededPropType As ICodeClass, _
   ByVal value As Object, _
   ByVal reference As Boolean, _
   ByVal designTime As Boolean _
) As ICodePropertySetStatement
[C#]
ICodePropertySetStatement CreatePropertySetStatement(
   string[] target,
   ICodeClass targetType,
   string propertyName,
   ICodeClass neededPropType,
   object value,
   bool reference,
   bool designTime
);
[C++]
ICodePropertySetStatement* CreatePropertySetStatement(
   String* target[],
   ICodeClass* targetType,
   String* propertyName,
   ICodeClass* neededPropType,
   Object* value,
   bool reference,
   bool designTime
) = 0;
[JScript]
function CreatePropertySetStatement(
   target : String[],
   targetType : ICodeClass,
   propertyName : String,
   neededPropType : ICodeClass,
   value : Object,
   reference : Boolean,
   designTime : Boolean
) : ICodePropertySetStatement;

Parameters

target
An array of names to set the property on. These targets must be subobjects. For example, to create a property set expression for this code:
Panel1.Children.Items myControlArray

You would need to pass in a string array that contained "Panel1" and "Children".

targetType
[To be supplied.]
propertyName
[To be supplied.]
neededPropType
If the'value' isn't the correct type, then this can be set to any type. The code generator will then generate any needed casts or conversions to ensure type consistency.
value
The value to set the property to. This can either be a variant for a specific value, or an object that implements one of the expression interfaces.
reference
[To be supplied.]
designTime
Whether this method should only be available at design time. A design time method is commented in the persisted source code but interpreted at design time.

Return Value

The newly created code property set.

See Also

ICodeSourceFile Interface | ICodeSourceFile Members | System.ComponentModel.Design.CodeModel Namespace | ICodeArrayCreateExpression | ICodeObjectCreateExpression | ICodeMethodInvokeExpression | ICodeNameReferenceExpression