Show / Hide Table of Contents

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
DependsOnControllerAttribute
Namespace: Eco.Core.Controller
Assembly: Eco.Core.dll
Syntax
public class SyncToViewAttribute : Attribute

Constructors

SyncToViewAttribute(SyncFlags)

Declaration
public SyncToViewAttribute(SyncFlags flag)
Parameters
Type Name Description
SyncFlags flag

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
public SyncFlags Flags
Field Value
Type Description
SyncFlags

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
public Type ViewType
Field Value
Type Description
System.Type

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾