Example #1
0
 internal PropertyOrField([NotNull] PropertyInfo property, [CanBeNull] ScriptableObjectPropertyAttribute attribute)
 {
     Field     = null;
     Property  = property;
     IsValid   = true;
     Attribute = attribute;
 }
Example #2
0
 internal PropertyOrField([NotNull] FieldInfo field, [CanBeNull] ScriptableObjectPropertyAttribute attribute)
 {
     Field     = field;
     Property  = null;
     IsValid   = true;
     Attribute = attribute;
 }
Example #3
0
        public MemberSetter([NotNull] FieldInfo field, [CanBeNull] ScriptableObjectPropertyAttribute attribute)
        {
            _property = null;
            _field    = field;
            Attribute = attribute;
            IsValid   = true;

            _valueSetter = CompileFieldSetter(field);
        }
Example #4
0
        public MemberSetter([NotNull] PropertyInfo property, [CanBeNull] ScriptableObjectPropertyAttribute attribute)
        {
            _property = property;
            _field    = null;
            Attribute = attribute;
            IsValid   = true;

            _valueSetter = CompilePropertySetter(property);
        }
Example #5
0
 private static string GetCorrectedMemberName([CanBeNull] ScriptableObjectPropertyAttribute sopa, [CanBeNull] INamingConvention naming, [NotNull] string fallback)
 {
     return(!string.IsNullOrEmpty(sopa?.Name) ? sopa.Name : (naming != null ? naming.GetCorrected(fallback) : fallback));
 }