Class SyncToViewAttribute
SyncToView denotes a property or method result as a value that exists in the view on the client.
This is used on classes inheriting from IController, and will individually sync the tagged properties to the client.
Important Notes:
- If the properties never change apart from the parent, you can leave the class not derived from IController, and it will sync
all [Serialized] properties. If none are tagged Serializsed, it will sync all of them. The class will need to defined in shared
code in this case, as only classes deriving IController get autogenned.
- Structs will also sync this way, syncing everything inside.
Inheritance
System.Object
SyncToViewAttribute
Assembly: Eco.Core.dll
Syntax
public class SyncToViewAttribute : Attribute
Constructors
SyncToViewAttribute(SyncFlags)
Declaration
public SyncToViewAttribute(SyncFlags flag)
Parameters
SyncToViewAttribute(String, Boolean)
Declaration
public SyncToViewAttribute(string propertyName = null, bool viewIsReadOnly = true)
Parameters
Type |
Name |
Description |
System.String |
propertyName |
|
System.Boolean |
viewIsReadOnly |
|
Fields
Flags
Declaration
Field Value
PropertyName
Declaration
public readonly string PropertyName
Field Value
Type |
Description |
System.String |
|
ViewIsReadOnly
Declaration
public readonly bool ViewIsReadOnly
Field Value
Type |
Description |
System.Boolean |
|
ViewType
Declaration
Field Value
Type |
Description |
System.Type |
|
Extension Methods