public virtual MappedMember Map(MemberArgsValue args) { if (args.Member == null || (args.Family == MetaType.AttributeFamily.None && !args.IsEnumValueMember)) { return(null); } if (args.Member.Name == "Values") { } if (args.IsEnumValueMember) { args.IsForced = true; } var state = new MemberState(args); MemberMainSettingsValue m = state.MainValue; m.Tag = int.MinValue; state.MainValue = m; if (ProcessHandlers(state) == MemberHandlerResult.Ignore || (state.MainValue.Tag < state.MinAcceptFieldNumber && !state.Input.IsForced)) { return(null); } if (!state.SerializationSettings.HasSettingsSpecified(0)) { state.SerializationSettings.SetSettings(state.SerializationSettings.GetSettingsCopy(0), 0); } if (state.SerializationSettings.DefaultLevel == null) { state.SerializationSettings.DefaultLevel = new ValueSerializationSettings.LevelValue(state.SerializationSettings.GetSettingsCopy(0).Basic.MakeDefaultNestedLevel()); } return(new MappedMember(state) { ForcedTag = state.Input.IsForced || state.Input.InferTagByName }); }
public MemberState(MemberArgsValue input) { Input = input; }