Example #1
0
        private static string GetConverterString(fsMetaProperty member)
        {
            if (member.OverrideConverterType == null)
            {
                return("null");
            }

            return($"typeof({fsTypeExtensions.CSharpName( /*includeNamespace:*/member.OverrideConverterType, true)})");
        }
Example #2
0
        private fsResult GetProperty(object instance, out fsMetaProperty property)
        {
            var properties = fsMetaType.Get(Serializer.Config, instance.GetType()).Properties;

            for (var i = 0; i < properties.Length; ++i)
            {
                if (properties[i].MemberName == _memberName)
                {
                    property = properties[i];
                    return(fsResult.Success);
                }
            }

            property = default(fsMetaProperty);
            return(fsResult.Fail("No property named \"" + _memberName + "\" on " + fsTypeExtensions.CSharpName(instance.GetType())));
        }