Show / Hide Table of Contents

Class TooltipAffectedByAttribute

Put on an extension method with NewTooltipAttribute to mark that tooltip part as dirty when CallWhenChangedAttribute.Property changes in any instance of the extension method's type.

Inheritance
System.Object
WatchBaseAttribute
TooltipAffectedByAttribute
Inherited Members
WatchBaseAttribute.MemberName
WatchBaseAttribute.WatchAllMembers
WatchBaseAttribute.SubMemberName
WatchBaseAttribute.WatchAllSubMembers
WatchBaseAttribute.MemberTypeMustDerive
WatchBaseAttribute.OverridenType
WatchBaseAttribute.GetRootTypeAndMember(MemberInfo)
WatchBaseAttribute.GetWatchedPropType(MemberInfo)
WatchBaseAttribute.GetWatchedSubMember(MemberInfo)
WatchBaseAttribute.GetWatchedSubPropType(MemberInfo)
WatchBaseAttribute.ObjectIsExpectedType(Object)
Namespace: Eco.Core.PropertyHandling
Assembly: Eco.Core.dll
Syntax
public class TooltipAffectedByAttribute : WatchBaseAttribute
Remarks

Can't be used when tooltip use CacheAs.User. See 'Tooltip.md' for more info. See wiki guide here: https://github.com/StrangeLoopGames/Eco/wiki/Watching-System Requirements:

  • Can use on static extension methods. No need to pass the type being watched if its the same as the 'this' for the extension method.
  • If you're watching an event with params on a tooltip that's using CacheAs.Instance then the event param type must be the tooltip parent (TO DO : we should make an assert for this when tooltips are moved to Core instead of Gameplay).

Constructors

TooltipAffectedByAttribute(Boolean)

Declaration
public TooltipAffectedByAttribute(bool watchAllMembers)
Parameters
Type Name Description
System.Boolean watchAllMembers

TooltipAffectedByAttribute(String, Boolean)

Declaration
public TooltipAffectedByAttribute(string memberName, bool watchAllSubMembers)
Parameters
Type Name Description
System.String memberName
System.Boolean watchAllSubMembers

TooltipAffectedByAttribute(String, String, Type)

Declaration
public TooltipAffectedByAttribute(string memberName, string subMemberName = null, Type memberTypeMustDerive = null)
Parameters
Type Name Description
System.String memberName
System.String subMemberName
System.Type memberTypeMustDerive

TooltipAffectedByAttribute(Type, Boolean)

Declaration
public TooltipAffectedByAttribute(Type rootType, bool watchAllMembers)
Parameters
Type Name Description
System.Type rootType
System.Boolean watchAllMembers

TooltipAffectedByAttribute(Type, String, Boolean)

Declaration
public TooltipAffectedByAttribute(Type rootType, string memberName, bool watchAllSubMembers)
Parameters
Type Name Description
System.Type rootType
System.String memberName
System.Boolean watchAllSubMembers

TooltipAffectedByAttribute(Type, String, String, Type)

Declaration
public TooltipAffectedByAttribute(Type rootType, string memberName, string subMemberName = null, Type mustBeDerivedFrom = null)
Parameters
Type Name Description
System.Type rootType
System.String memberName
System.String subMemberName
System.Type mustBeDerivedFrom

Methods

GetCallback(MemberInfo, out Type)

Declaration
public override PropertyChangedBeforeAfterEventHandler GetCallback(MemberInfo memberWithAttribute, out Type expectedCallbackParam)
Parameters
Type Name Description
System.Reflection.MemberInfo memberWithAttribute
System.Type expectedCallbackParam
Returns
Type Description
PropertyChangedBeforeAfterEventHandler
Overrides
WatchBaseAttribute.GetCallback(MemberInfo, out Type)

PassEventFirstParamToCallback(Type, Type)

Declaration
public override bool PassEventFirstParamToCallback(Type firstParamType, Type rootType)
Parameters
Type Name Description
System.Type firstParamType
System.Type rootType
Returns
Type Description
System.Boolean
Overrides
WatchBaseAttribute.PassEventFirstParamToCallback(Type, 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
☀
☾